write a MATLAB function to implement Continuestime Fourier T
write a MATLAB function to implement Continues-time Fourier Transform and inverse-Fourier Transform
Solution
Continuos time Fourier Transform
>> dt = 0.001;
>> t = 0:dt:2*2*pi;
>> x = cos(t);
>> f = fftshift(fft(x));
>> N = length(f);
>> n = -(N-1)/2:(N-1)/2;
>> w = 2*pi*n/N/dt;
>> f = f ./ N;
>> stem(w,real(f));
>> axis([-10 10 -1 1]);
