%INEL 5326- Chirp Signal Analysis - Prof. Domingo Rodriguez - January 29, 2008
%***************************************************************
%Parameter Set
%***************************************************************
Fs=8000;
Ts=1/Fs;
tinc=Ts;
Tm=5*Ts;
m=1000;
V=m*Tm;
N=V*Fs;
t=0:tinc:V-Ts;
finc=Fs/N;
f=-(Fs/2):finc:(Fs/2)-finc;
M=100;
a=2*pi*3200;
b=1000;
c=0.25*pi;
%****************************************************************
%Signal Computation
%****************************************************************
x=M*cos((0.5*a)*(t.*t)+2*pi*b*t+c);
fx=fft(x);
sfx=fftshift(fx);
asfx=abs(sfx);
%****************************************************************
%Plots
%****************************************************************
plot(t,x)
grid
xlabel('Time in Seconds')
ylabel('Magnitude')
title('Linear Chirp Signal x(t)=Mcos(0.5at**2+bt+c)')
pause
figure
plot(f,asfx)
grid
xlabel('Frequency in Hertz')
ylabel('Magnitude')
title('Spectrum of Chirp Signal x(t)=Mcos(0.5at**2+bt+c)')
%****************************************************************
%Sound
%****************************************************************
sound(x,Fs)
