Submit the assignment in the prescribed format.
rect
, tri
, and
step
functions. Plot each function in Matlab using sample
values of the parameters.
(a) | ![]() | ![]() |
(b) | ![]() | ![]() |
(c) | ![]() | ![]() |
function y = genexp(b, L, n0) %GENEXP generate an exponential signal % usage: Y = genexp( B, L, N0 ) % % B input scalar giving ratio between terms % L length of generated signal % N0 starting index (integer) % % Y output signal Y(1:L) if (L<=0) error('GENEXP: length not positive') end nn = n0 + [1:L]' - 1; % vector of indices y = b.^nn;
Use the results from the previous part to sum an exponential and compare the results to the formula (evaluated in Matlab)
y[n] - a y[n-1] = x[n]
with initial conditions y[-1] = 0. In Matlab the function filter
will implement a difference equation. Use filter
to generate the same sequence
as in part (a)
mtlb
, seperate the syllables so that the phrase is
"labmat" and plot the results. Reverse the signal (play it backwards) and plot the results.
Remember to show the matlab operations you used for these tasks.
Maintained by John Loomis, last updated 21 Aug 2005