Calculating and Plotting the n-Point DFT of a Signal in MATLAB

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 3K views
jorgmartnez
Messages
1
Reaction score
0
Hello I am trying to calculate the n-point DFT of a signal using fft where n=512 and plot it in matlab. The signal is a separate file that I have read into matlab. I am able read and plot the first 512 values of the signal but when I try to get the dft of the signal and plot it the outcome does not look correct. How could I go about achieving this?
 
on Phys.org
I could probably help but your question does not have enough information for me to figure out what the issue is. Is the issue with the FFT or with the plotting? Do you need help creating the frequency vector with which to plot the fft of your signal? What does not look correct?