?? shuaijianzhengxian.m
字號(hào):
n=0:15;
w=0:1/511:15;
w1=0:511;
w2=0:2*pi/511:2*pi;
x1=exp(-0.1*n).*sin(2*pi*0.0625*n);
x2=exp(-0.1*n).*sin(2*pi*0.2375*n);
x3=exp(-0.1*n).*sin(2*pi*0.4375*n);
x4=exp(-0.1*n).*sin(2*pi*0.5625*n);
x11=exp(-0.1*w).*sin(2*pi*0.0625*w);
x21=exp(-0.1*w).*sin(2*pi*0.2375*w);
x31=exp(-0.1*w).*sin(2*pi*0.4375*w);
x41=exp(-0.1*w).*sin(2*pi*0.5625*w);
figure
subplot(2,1,1);plot(w,x11);title('信號(hào)圖形(f=0.0625)');
grid on
subplot(2,1,2);plot(w,x21);title('信號(hào)圖形(f=0.2375)');
grid on
figure
subplot(2,1,1);plot(w,x31);title('信號(hào)圖形(f=0.4375)');
grid on
subplot(2,1,2);plot(w,x41);title('信號(hào)圖形(f=0.5625)');
grid on
figure
subplot(2,1,1);stem(n,abs(fft(x1)));title('信號(hào)頻譜(f=0.0625)');
grid on
subplot(2,1,2);stem(n,abs(fft(x2)));title('信號(hào)頻譜(f=0.2375)');
grid
figure
subplot(2,1,1);stem(n,abs(fft(x3)));title('信號(hào)頻譜(f=0.4375)');
grid on
subplot(2,1,2);stem(n,abs(fft(x4)));title('信號(hào)頻譜(f=0.5625)');
grid on
figure
subplot(2,1,1);plot(w2/pi,abs(fft(x1,512)));title('信號(hào)的dtft(f=0.0625)');%512點(diǎn)的fft近似為dtft.
grid on
subplot(2,1,2);plot(w2/pi,abs(fft(x2,512)));title('信號(hào)的dtft(f=0.2375)');
grid
figure
subplot(2,1,1);plot(w2/pi,abs(fft(x3,512)));title('信號(hào)的dtft(f=0.4375)');
grid on
subplot(2,1,2);plot(w2/pi,abs(fft(x4,512)));title('信號(hào)的dtft(f=0.5625)');
grid on
figure
subplot(2,1,1);plot(w1/512,abs(fft(x1,512)),n/16,abs(fft(x1)),'o');title('f=0.0625');
grid on
subplot(2,1,2);plot(w1/512,abs(fft(x2,512)),n/16,abs(fft(x2)),'o');title('f=0.2375');
grid
figure
subplot(2,1,1);plot(w1/512,abs(fft(x3,512)),n/16,abs(fft(x3)),'o');title('f=0.4375');
grid on
subplot(2,1,2);plot(w1/512,abs(fft(x4,512)),n/16,abs(fft(x4)),'o');title('f=0.5625');
grid on
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -