Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [y] = inputSideConvolution(s, h)
- y = zeros(1, length(s)+length(h)-1);
- for i=1:length(s)
- for j=1:length(h)
- y(i+j-1) = y(i+j-1) + s(i)*h(j);
- end
- end
- subplot(3, 1, 1);
- stem(s);
- title('Signal');
- subplot(3, 1, 2);
- stem(h);
- title('Impulse Response');
- subplot(3, 1, 3);
- stem(y);
- title('Convolution');
- disp(y);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement