🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: sci.math.num-analysis
1 messages
1 total messages Started by Bruce Sutherland Fri, 16 Oct 1992 01:29
bug in FFT Numerical Recipes in C?
#641
Author: Bruce Sutherland
Date: Fri, 16 Oct 1992 01:29
16 lines
1334 bytes
I'm hoping there are some people who have encountered a similar problem
to mine using the `Numerical Recipes in C' Fast Fourier Transform routine, four1.

In taking the fourier transform of the real function f(z)=z I get the
correct imaginary part of the fourier coefficients.  However, the real part,
which should be zero, evaluates to the same constant,C, for all non-zero
modes and zero for the zero mode.  If the domain size is L, this constant 
is L/(n-1) where n is the number of fourier modes.  It is as if the fft 
creates the shadow of a downwards shifted delta function, C (delta(x) -1).

I get the same results using both the realft and four1 routines.  What I want
to know is whether this result (C non-zero) is an artifact of the program
and if there is any way to eliminate it in a satisfactory manner?  

Thanks in advance,
Bruce Sutherland (brucer@helios.physics.utoronto.ca)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads