Nitin400

Full Convolution Method

Aug 3rd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. clear all
  2. close all
  3. clc
  4. x=[1 2 3 0 0];
  5. subplot(2,2,1)
  6. stem(x)
  7. h=[4 5 6 0 0];
  8. subplot(2,2,2)
  9. stem(h)
  10. for i=1:5
  11.     y(i)=0;
  12.     for j=1:3
  13.         if(i-j+1>0)
  14.         y(i)=(y(i)+x(j))*h(i-j+1);
  15.         else
  16.         end
  17.         end
  18.         end
  19.         subplot(2,2,3)
  20.         stem  (y);
Add Comment
Please, Sign In to add comment