Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- close all
- clc
- x=[1 2 3 0 0];
- subplot(2,2,1)
- stem(x)
- h=[4 5 6 0 0];
- subplot(2,2,2)
- stem(h)
- for i=1:5
- y(i)=0;
- for j=1:3
- if(i-j+1>0)
- y(i)=(y(i)+x(j))*h(i-j+1);
- else
- end
- end
- end
- subplot(2,2,3)
- stem (y);
Add Comment
Please, Sign In to add comment