[R] fft question

Ross Ihaka ihaka at stat.auckland.ac.nz
Thu Mar 11 20:40:38 CET 2004


Frank Gerrit Zoellner wrote:
> Hi!
> 
> I am using the fft() function the base package to transform some 1d signal. 
> If I use this standar fucntion I get a very huge first fourier coeficient.
> I think this dues to the handling of the borders of the signal.
> Usually in fft especially in image processing the signal is simulated to be continuous by adding the signal several times periodically. My question is, is there some function implemented in R handling this or do I have to combine my data manually ?
> 
> Thanks, 

The fft function computes the discrete transform

	d(lambda) = SUM x(t) exp(-i * lambda * t)

(for a discrete set of lambda values).

The first coefficient is just SUM x(t).  This means that the
problem is not end-point discontinuity, but the fact that the
average level of the signal is non-zero.

Replicating the series k times won't help, you'll just
make the first coefficent k times bigger.

-- 
Ross Ihaka                         Email:  ihaka at stat.auckland.ac.nz
Department of Statistics           Phone:  (64-9) 373-7599 x 85054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand




More information about the R-help mailing list