MATLAB Problem Where contFT is given by A(a) Use the function contFT to compute
ID: 2079675 • Letter: M
Question
MATLAB Problem
Where contFT is given by
A(a) Use the function contFT to compute the Fourier transform of s (t) 3sinc(2t 3), where the unit of time is a microsecond, the signal is sampled at the rate of 16 MHz, and truncated to the range I-8, 8 microseconds. We wish to attain a frequency resolution of 1 KHz or better. Plot the magnitude of the Fourier transform versus frequency, making sure you specify the units on the frequency axis. Check that the plot conforms to your expectations. (b) Plot the phase of the Fourier transform obtained in (a) versus frequency (again, make sure the units on the frequency axis are specified). What is the range of frequencies over which the phase plot has meaning?Explanation / Answer
function [X,f,df]=contFT(x,tsatrt,dt,df_desired)
Nmin=max(ceil(1/df_desired*dt)),length(x));
Nfft=2^(nextpow2(Nmin))
X=dt*fftshift(fft(x,Nfft));
df=1/Nfft*dt);
f=((0;Nfft-1)-Nfft/2)*df;
X=X.*exp(-j*2*pi*f*tstart);
end
% Above file saved as conFt
%Below code is run in cmd.
[X,f,df]=conFT(3*sinc(2*t-3),-0.000008,1/16000000,1000);
H=abs(X);
subplot(2,1,1);
stem(f,H);
G=angle(X)
subplot(2,1,2);
stem(f,G);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.