?? ex_04_09_1.m
字號:
% ex_04_09_1.m : 習(xí)題 4.9
clear all;
N=4096;
f1=.1;
fs=1;
a1=5;
w=2*pi/fs;
x=a1*sin(w*f1*(0:N-1))+randn(1,N);
% 應(yīng)用FFT 求頻譜;
figure('color','w')
subplot(3,1,1);
plot(x(1:N/100));
% title('x(n)');
f=-0.5:1/N:0.5-1/N;
X=fft(x);
%
subplot(3,1,2);
plot(f,fftshift(abs(X)));
%title('|X(k)|');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -