Write a MATLAB function that will synthesize a \"chirp\" (linear-FM) signal with
ID: 2083696 • Letter: W
Question
Write a MATLAB function that will synthesize a "chirp" (linear-FM) signal with the following parameters: A total time duration of 2.5 s where the desired instantaneous frequency starts at 13,000 Hz and ends at 200 Hz. Use a sampling rate of f_s D 8000 Hz. Create a spectrogram of your chirp signal. In addition, make some theoretical calculations by hand: Determine the range of frequencies (in hertz) that will be synthesized by this MATLAB script. Make a sketch by hand of the instantaneous frequency versus time. Explain how aliasing affects the instantaneous frequency that is actually heard.Explanation / Answer
function[xx,tt]=chirpsig(f1,f2,td,fs)% chirpsig will generate a linear-FM chirp signal
tt=0:1/fs:td; % vector of time instants for t=0 to t=dur
m=(f1-f2)/(2*td);
psi=2*pi*(m*tt.*tt+f1*tt+100);
xx=real(7.7*exp(j*psi)); % vector of samples of the chirp signal
soundsc(xx,fs); % Listen chirp signal
end
save the above function in a script file as chirpsig.m.
run the function by typing the following code in the MATLAB command window as per the given parameters
[xx,tt]=chirpsig(13000,200,2.5,8000);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.