Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1 = [1,2,4]
- x2 = [0,1,-2,3,-4]
- x3 = [1,2,3,4]
- x4 = [1,2,3,4]
- h1 = [1,1,1,1,1]
- h2 = [0.5,1,2,1,0.5]
- h3 = [4,3,2,1]
- h4 = [1,2,3,4]
- c1 = conv(x1, h1)
- c2 = conv(x2, h2)
- c3 = conv(x3, h3)
- c4 = conv(x4, h4)
- subplot(2,2,1)
- stem(c1,'filled')
- ylim([0 10])
- title('Linear Convolution of x1 and h1')
- subplot(2,2,2)
- stem(c2,'filled')
- ylim([-10 5])
- title('Linear Convolution of x2 and h2')
- subplot(2,2,3)
- stem(c3,'filled')
- ylim([0 35])
- title('Linear Convolution of x3 and h3')
- subplot(2,2,4)
- stem(c4,'filled')
- ylim([0 30])
- title('Linear Convolution of x4 and h4')
Advertisement
Add Comment
Please, Sign In to add comment