# Plot Magnitude of a Sequence in Matlab

Consider a sequence x[n]={1,-1,1,-1}.

Please help in determining how to use the function fft to find the DFT coefficients X[k] of x[n] in Matlab. Also, how would you plot the magnitude of X[k] in Matlab?

https://brainmass.com/engineering/electrical-engineering/plot-magnitude-sequence-matlab-153515

#### Solution Preview

The DFT in Matlab is done by function fft (see a reference page from Matlab Help in the attached Word file).

The Fourier transform is ...

#### Solution Summary

This solution explains how to determine the use of the function fft to find the DFT coefficients.

$2.19