0
$\begingroup$

I am reading this example http://www.thefouriertransform.com/pairs/truncatedCosine.php

What does it mean to have some of the frequency components be negative in its amplitude ? I am not talking about the negative frequencies.

$\endgroup$
3
$\begingroup$

The fft returns complex values, to get the amplitude you need to take the abs( ). The real and imaginary portion tell you about the signals phase. Remember the fft is changing the basis by projecting your signal onto a complex sinusoid: $$e^{i \omega t} = \cos(\omega t) + i \sin(\omega t)$$

and thus your signal is now a set of complex sinusoids which have some phase and amplitude. Think about the phase of a vector $v = [a, \, i\cdot b]$ on the complex plane and what this would mean.

$\endgroup$
0
$\begingroup$

The Fourier Transform is complex valued, it can be represented either as "real part and imaginary part" or as "amplitude and phase". Normally you need two graphs to show the entire picture of a Fourier Transform

The link you post just shows the real part and in this particular example, the imaginary part happens to be zero. Real and imaginary part can be both positive and negative. If you use "amplitude & phase" the amplitude is always positive and often the phase is constrained to $[ -\pi, \pi]$

$\endgroup$
0
$\begingroup$

The answer discussing complex numbers is more mathematically elegant.

But you can also regard an FFT as just doing correlations against cosine waves and sine waves of various frequencies (but all of these sinusoids starting with a phase of zero with respect to the left/right edges of the FFT window). All real numbers.

A negative real component just means the correlation against that particular cosine wave is negative, e.g. the input waveform seems to wiggle in the opposite direction of the corresponding cosine function, goes mostly low when the cosine goes high and vice versa. Same for the imaginary component and the sine function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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