I was thinking the same thing but written something ambiguous instead. I just remembered it was also called taking the "magnitude". Thannks for the clarification.
--- On Wed, 7/23/08, Inigo Aldazabal Mensa <[EMAIL PROTECTED]> wrote: > From: Inigo Aldazabal Mensa <[EMAIL PROTECTED]> > Subject: Re: [Help-gsl] Quick FFT question > To: [email protected] > Date: Wednesday, July 23, 2008, 6:06 PM > El Martes, 22 de Julio de 2008 18:37, Nghia Ho escribió: > > Hi, > > > > I need to implement an algorithm that makes use of the > FFT to do some > > basic signal processing. Basically, given an array of > numbers I would > > like to extract the coefficients of the N lowest > frequency components. > > > > The GSL document says the results are laid out such > that index from 0 to > > N/2 are the positive frequencies and the rest are > negative. My > > mathematical knowledge of FFT is limited so please > bare with me on the > > next question. I see the real values are the same for > both > > positive/negative side, but imaginary values flip. > > This is so because your input signal is Real (I mean, Real > numbers). In > this case the values form the positive/negative frequencies > are complex > conjugate of each other, as you say. See eg[1] for more > info and > references. > > > So if I take the > > magnitude (|Re + Imz|) of the first N values of the > positive side would > > that give me what I want? > > > > I don't know what exactly do you mean by |Re + Imz|, > but if you take the > modulus of the complex number, |z|=sqrt(a*a+b*b), being > z=a+ j b, > j=sqrt(-1), this |z| will be equal for each semiaxis, i.e > |z(w)|=|z(-w)|, > and gives you the frequency spectra for your signal. For > this see > e.g. "The Scientist and Engineer's Guide to > Digital Signal Processing" > By Steven W. Smith, Ph.D., chapter 8, specifically section > "Polar Notation" > [2]. If you are new to DFT take a look to the whole > chapter, and also to > the next one "Applications of the DFT", it will > be worth it. > > [1]http://en.wikipedia.org/wiki/Discrete_Fourier_transform#The_real-input_DFT > > [2]http://www.dspguide.com/ch8/8.htm > > > > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
