level 12
随风V嗜魔
楼主
n=0:80;
x1=cos(0.2*pi*n);x2=cos(0.8*pi*n);
x=x1+x2;
%figure;
%su
bp
lot(2,2,1);stem(n,x1);title('x1');
%subplot(2,2,2);stem(n,x2);title('x2');
%subplot(2,2,3);stem(n,x);title('x');
y=filter(b,1,x);
subplot(2,2,4);stem(n,y);title('y');
figure;
fx1=freqz(x1,100);fx2=freqz(x2,100);fx=freqz(x,100);fy=freqz(y,100);
subplot(2,2,1);plot(abs(fx1));title('freqency response of fx1');
subplot(2,2,2);plot(abs(fx2));title('freqency response of fx2');
subplot(2,2,3);plot(abs(fx));title('freqency response of fx');
subplot(2,2,4);plot(abs(fy));title('freqency response of fy');
2013年05月19日 07点05分
1
x1=cos(0.2*pi*n);x2=cos(0.8*pi*n);
x=x1+x2;
%figure;
%su
bp
lot(2,2,1);stem(n,x1);title('x1');
%subplot(2,2,2);stem(n,x2);title('x2');
%subplot(2,2,3);stem(n,x);title('x');
y=filter(b,1,x);
subplot(2,2,4);stem(n,y);title('y');
figure;
fx1=freqz(x1,100);fx2=freqz(x2,100);fx=freqz(x,100);fy=freqz(y,100);
subplot(2,2,1);plot(abs(fx1));title('freqency response of fx1');
subplot(2,2,2);plot(abs(fx2));title('freqency response of fx2');
subplot(2,2,3);plot(abs(fx));title('freqency response of fx');
subplot(2,2,4);plot(abs(fy));title('freqency response of fy');