?? luntanstft.m
字號:
figure(1)
k=4;T=5;
fc=k*T;
fs=3*fc;
Ts=1/fs;
N=T/Ts;
x=zeros(1,N);
t=0:N-1;
x=exp(j*k*pi*(t*Ts).^2);
% x=awgn(x,-3,'measured');
subplot(221)
plot(t*Ts,real(x))
X=fft(x);
X=fftshift(X);
subplot(222)
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(223)
fnew=((1:nfft)-nfft/2)*fs/nfft;
tnew=(1:Tn)*L*Ts;
[F,T]=meshgrid(fnew,tnew);
mesh(F,T,abs(TF))
subplot(224)
contour(F,T,abs(TF))
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -