Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Nz=[0.18 -0.11];
- Dz=[1 -0.9 0.81];
- n=[0:50];
- x=cos(0.8*pi*n + pi/5)+3*sin(0.1*pi*n);
- y= filter(Nz,Dz,x);
- subplot(2,2,1);
- plot(n,x);
- title('vhoden signal');
- xlabel('otcheti na vremeto');
- grid;
- subplot(2,2,2);
- plot(n,y);
- K=1024;
- Px=fft(x,K);
- px1=abs(Px(1:K/2));
- f=(0: (length(Px)-1)/2)';
- subplot(2,2,3);
- plot(f,px1);
- grid; xlabel('Otcheti na chestotata f');
- title('Amplt spek na signala');
- Px=fft(y,K);
- px1=abs(Px(1:K/2));
- f=(0: (length(Px)-1)/2)';
- subplot(2,2,4);
- plot(f,px1);
- grid; xlabel('Otcheti na chestotata f');
- title('Amplt spek na signala');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement