⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p200.m

📁 在傅立叶变换时加入适当的时间窗
💻 M
字号:
k=4;T=5;
fc=k*T;
fs=4*fc;
Ts=1/fs;
N=T/Ts;
x=zeros(1,N);
t=0:N-1;
x=exp(j*k*pi*(t*Ts).^2);
subplot(2,2,1);
plot(t*Ts,real(x));
X=fft(x);
subplot(2,2,2);
plot((t-N/2)*fs/N,abs(X));
Nw=20;
L=Nw/2;
Tn=(N-Nw)/L+1;
nfft=32;
TF=zeros(Tn,nfft);
for i=1:Tn
    xw=x((i-1)*10+1:i*10+10);
    temp=fft(xw,nfft);
    temp=fftshift(temp);
    TF(i,:)=temp;
end
subplot(2,2,3);
fnew=((1:nfft)-nfft/2)*fs/nfft;
tnew=(1:Tn)*L*Ts;
[F,T]=meshgrid(fnew,tnew);
mesh(F,T,abs(TF));
subplot(2,2,4);
contour(F,T,abs(TF)); % ok

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -