Using he MATLAB Mfile dft compute the 32point DFT of the sig

Using (he MATLAB M-file dft, compute the 32-point DFT of the signals (a) (f). Express your answer by plotting the amplitude |X_k| and phase

Solution

x = ones(1:11);
xfft = fft(x,32);%calculating 32 point dft
magx = abs(xfft);%taking the magnitude
f = (0:length(magx)-1)*100/length(magx);%generating frequency vector
subplot(2,1,1);
plot(f,magx)%plotting magnitude vs frequency
phasex = unwrap(angle(xfft));
subplot(2,1,2);
plot(f,phasex);%plotting phase vs frequency

 Using (he MATLAB M-file dft, compute the 32-point DFT of the signals (a) (f). Express your answer by plotting the amplitude |X_k| and phase Solutionx = ones(1:

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site