www.pudn.com > chirp.rar > chirp_ex.m


p=20/2; 
TW=50; 
s=dchirp(TW,p); 
figure(1) 
T=25e-6; 
N=p*TW; 
t=[-T/2:T/N:T/2];t(end)=[]; 
plot(t*1e6,real(s)) 
xlabel('t (\mus)'),ylabel('The real of s(n)') 
title('The Chirp signal') 
 
figure(2) 
fs=p*TW/T; 
y=fft(s); 
y=fftshift(s); 
N1=length(y); 
f=[-N1/2:N1/2]/N1*fs;f(end)=[]; 
plot(f/1e6,abs(y)),grid on 
title('The frequence of Chirp signal') 
xlable('f (MHz)'),ylable('Magnitude')