[R] Synthesis of harmonic functions

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sat Jan 19 15:30:10 CET 2002


Thomas Petzoldt <petzoldt at rcs.urz.tu-dresden.de> writes:

> Hello,
> 
> I try to synthesize harmonic functions with a subset of frequencies
> determined by fast fourier transform. I wrote two different functions, a
> looped version and a matrix multiplication version. As an example the
> looped version takes 5 sec and the matrix-version takes 3-4 sec (R 1.4,
> Athlon 1.2 GHz, 256 MB, Win ME), but the latter needs huge amount of
> memory due to the matrices. So, none of them is satisfying.
> 
> Is there a common way, a better solution or a built-in function (e.g.
> inverse of fft) which I have overlooked?

Did you look into using fft(x, inverse=TRUE) ??

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list