Re: [R] FFT, frequs, magnitudes, phases

From: Martin Maechler <>
Date: Sat 20 Aug 2005 - 23:58:34 EST

>>>>> "PD" == Peter Dalgaard <> >>>>> on 19 Aug 2005 14:16:42 +0200 writes:

    PD> Wolfgang Waser <> writes:
>> Hi,
>> I'm in dire need of a fast fourier transformation for me
>> stupid biologist, i.e. I have a heartbeat signal and
>> would like to decompose it into pure sin waves, getting
>> three vectors, one containing the frequencies of the sin
>> waves, one the magnitudes and one the phases (that's what
>> I get from my data acquisition software's FFT function).
>> I'd be very much obliged, if someone could point out
>> which command would do the job in R.

    PD> fft(), but notice that it gives the complex
    PD> transform. You need to do a little homework to get at
    PD> the magnitude/phase values. (Basically, you just have to
    PD> take Mod() and Arg(), but there some conventions about
    PD> the frequencies and multipliers that one can get wrong).

Once you've finished the "homework", others might be interested in your result... so it will be found in the future using RSiteSearch().

Martin mailing list PLEASE do read the posting guide! Received on Sun Aug 21 00:02:56 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:39:24 EST