Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- %Stałe
- h=fir1(18,0.3);
- t = 0:0.001:1;
- %sygnały wejścia
- sin1=sin(2*pi*t*15);
- sin2=sin(2*pi*t*350);
- x = sin1+sin2;
- y = zeros(1, length(x) + length(h));
- for n=1:length(x)
- for m=1:length(x)
- try
- temp = h(m)*x(n-m);
- catch
- temp = 0
- end
- y(n)=y(n) + temp;
- end
- end
- % Rysowanie wykresów
- figure(1);
- plot(t,sin1);
- figure(2);
- plot(t,sin2)
- figure(3);
- plot(t,x);
- figure(4);
- freqz(h,1)
- figure(5) ;
- plot(t,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement