Function to be transformed
 Fourier Transform





This page demonstrates the use of JavaScript to perform Fourier Transforms, and DHTML to produce graphs of functions. Enter a function in terms of x in the top box. Enter minimum and maximum values for x and y in the next four boxes. Then, hit the Replot! button. If you make a mistake in entering a formula, use the Refresh feature of your browser.

Functions available in JavaScript are abs(x), acos(x), asin(x), atan(x), ceil(x), cos(x), exp(x), floor(x), log(x), max(x,n), min(x,n), pow(x,n), random(), round(x), sin(x), sqrt(x) and tan(x).

Once a function is displayed, a Fourier Transform can be performed by pressing the FFT! button. Although only 512 points are shown in the upper grapph, a Fast Fourier Transform is calculated on 1024 points from the entered function. So the Nyquist frequency for the FT is twice the apparent Nyquist frequency for the upper plot. Each of the resulting 512 real and imaginary FT points are squared and added together to produce a power spectrum. The maximum frequency, ν, and angular freqency, ω (=2πν), are displayed as determined from the maximum and mininum x values. The individual data points of the power spectrum are also listed in the lower text box. The vertical axis of the Fourier transform can be magnified by changing the value of Fmax and hitting the lower Replot! button.

Here's a good tutorial on Fourier transforms.

And one from Colby College.

Here are some interesting functions on which to perform Fourier transforms:

For the following use, a whole number, such as 8, for x max.

Other pages by the author. Email.
Debut: December 26, 2003. Revision No. 7. August 23, 2006