2
$\begingroup$

I have got a txt file which contains voltage and time data. When I did fourier transform using fft function in matlab I got complex numbers. I understand that the real part is the magnitude and the imiginary part is phase. How can I determine whether there is any aliasing by looking at that complex numbers?

Another question I would like to ask is whether there is any relation between third harmonic and aliasing?

Thanks...

$\endgroup$
2
  • 1
    $\begingroup$ The real part is the real part and the imaginary part is the imaginary part of the FFT. If you want the magnitude and phase, you need to convert the complex numbers to their polar representation in terms of amplitude and phase. $\endgroup$
    – jan
    Commented Aug 12, 2013 at 15:12
  • $\begingroup$ The time data is evenly spaced, right? $\endgroup$
    – endolith
    Commented Aug 18, 2013 at 14:28

1 Answer 1

2
$\begingroup$

Both the real (even or cosine correlation) and the imaginary (odd or sine correlation) components of an FFT result are required to calculate the 2D vector magnitude.

In general, you can't determined if a set of samples contains aliasing without knowing something about the signal before it was sampled, such as the signal's bandwidth vs. the sample rate and the cutoff frequency of any pre-filtering.

$\endgroup$
2
  • $\begingroup$ Actually, I have got a set of data(time and voltage) from the oscilloscope. It was sampled at 20ms. When I did FFT on that data set, I got a series of complex numbers. According to my knowledge, to determine the aliasing I need to draw the frequency spectrum. But I don't have any idea on how to draw the frequency spectrum from that magnitude and phase. $\endgroup$
    – John
    Commented Aug 13, 2013 at 14:05
  • $\begingroup$ @John: The frequency spectrum is just the magnitude of the FFT. Ignore the phase. it's usually plotted with logarithmic amplitude like dB, and often on a logarithmic frequency axis too. $\endgroup$
    – endolith
    Commented Aug 18, 2013 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.