FFT, frequs, magnitudes, phases
Wolfgang Waser <wolfgang.waser at rz.hu-berlin.de> 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.
fft(), but notice that it gives the complex transform. You need to do a little homework to get at the magnitude/phase values. (Basically, you just have to take Mod() and Arg(), but there some conventions about the frequencies and multipliers that one can get wrong).
O__ ---- Peter Dalgaard ??ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907