Convolution & Recursive Difference Equations in MATLAB

Thread Starter

thinkberry

Joined Feb 3, 2013
1
The assignment required that we plot outputs from a system using convolution as well as compare it to a recursive difference equation. So I plotted y[n] = x[n]*h[n] where x[n] is a random signal and h[n] = 0.9^nu[n] and found:

http://i1014.photobucket.com/albums/af267/thinkberry/fig1-1.jpg

Then it says to plot another output y[n] = 0.9y[n-1] + x[n] with y[-1] = 0, and I found:

http://i1014.photobucket.com/albums/af267/thinkberry/fig2.jpg

I see that they're slightly different, but should they be? Why?

Also, same thing with a system whose impulse response is
h[n] = 0.9^n*cos(pi/3n)u[n]
and one governed by
y[n] = 0.9y[n-1] - 0.81y[n-2] + x[n] - 0.45x[n-1], y[-1]=y[-2]=0

whose respective graphs are
http://i1014.photobucket.com/albums/af267/thinkberry/fig3.jpg
http://i1014.photobucket.com/albums/af267/thinkberry/fig4.jpg

Thanks :)
 

WBahn

Joined Mar 31, 2012
33,192
Can you describe what is different about them? Are they significantly different, or is it a matter of a simple scaling or shifting?

Given the difference equation, what is the impulse response? How do those compare, both for the number of terms you are using in your convolution and for terms beyond it?
 
Top