Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. t=0:200;
  2. f=20;
  3. x1 = sin(2*pi*(2/200)*t);%sin 1
  4. x2 = sin(2*pi*(50/200)*t); %sin 2
  5. x3= x1+x2; %dodanie sinus 1 i sinus 2
  6. plot(t,x3)
  7. b = fir1(58,20/200,'low'); %dolno przpustowy fg=20
  8. c= fliplr(b);
  9.  
  10.  
  11. m=length(x3);
  12. n=length(c);
  13.  
  14. X=[x3,zeros(1,n)];
  15. H=[c,zeros(1,m)];
  16.  
  17.  
  18. for i = 1:n+m-1
  19. Y(i)=0;
  20. for j = 1:m
  21. if(i-j+1>0)
  22. Y(i)=Y(i)+X(j)*H(i-j+1);
  23. else
  24. end
  25. end
  26. end
  27. plot(Y)
  28. figure()
  29. plot(X)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement