?? y.m
字號:
n=0:63;
xb1=exp(-0.1*n).*sin(2*pi*0.0625*n);
w=randn(1,64);
y1=xb1+w;
xb2=exp(-0.1*n).*sin(2*pi*0.2375*n);
w=randn(1,64);
y2=xb2+w;
xb3=exp(-0.1*n).*sin(2*pi*0.4325*n);
w=randn(1,64);
y3=xb3+w;
xb4=exp(-0.1*n).*sin(2*pi*0.5625*n);
w=randn(1,64);
y4=xb4+w;
figure
subplot(2,1,1);stem(n,y1,'.');title('信號圖形(f=0.0625)');
subplot(2,1,2);stem(n,y2,'.');title('信號圖形(f=0.2375)');
figure
subplot(2,1,1);stem(n,y3,'.');title('信號圖形(f=0.4325)');
subplot(2,1,2);stem(n,y4,'.');title('信號圖形(f=0.5625)');
figure
subplot(2,1,1);stem(n/64,abs(fft(y1,64)),'.');title('y1的幅度譜(f=0.0625)');
subplot(2,1,2);stem(n/64,abs(fft(y2,64)),'.');title('y2的幅度譜(f=0.2725)');
figure
subplot(2,1,1);stem(n/64,abs(fft(y3,64)),'.');title('y3的幅度譜(f=0.4325)');
subplot(2,1,2);stem(n/64,abs(fft(y4,64)),'.');title('y4的幅度譜(f=0.5625)');
w1=0:511;
figure
subplot(2,1,1);plot(w1/512,abs(fft(y1,512)));title('y1的dtft(f=0.0625)');
subplot(2,1,2);plot(w1/512,abs(fft(y2,512)));title('y2的dtft(f=0.2725)');
figure
subplot(2,1,1);plot(w1/512,abs(fft(y3,512)));title('y3的dtft(f=0.4325)');
subplot(2,1,2);plot(w1/512,abs(fft(y4,512)));title('y4的dtft(f=0.5625)');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -