[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with fourier transform

From: Antonio L.
Subject: Problem with fourier transform
Date: Wed, 5 May 2004 03:33:33 -0500
User-agent: Internet Messaging Program (IMP) 3.2.1

Hello, I have a problem dealing with fourier transform in octave.
How is it possible to recover the value of a discrete periodic function, given
its fourier armonics coeficients?
I tried something like this:

-------- code ------------
y = [1,2,3,4,5]';       # original function
z = fftshift(fft(y));   # armonics

# given an integer value of x like -2,-1,0,1,2,3,4,5,6,....
x = <integer value>;

# we would get y(x) with this expression
y_x = sum(z.*exp((-2:2)'*i*pi*x/rows(z)))
------ end code ----------

But it doesn't give us even close original values of y suposed value i for x
will give us i-th value from vector y.
What am I doing wrong? Is it suposed to wortk other way octave fourier series?.

And what about the two dimentional case, in wich y is a general matrix and z =
fft2(y)? whould there be a similar way of finding original function values?

        hundred thanks in advance, Antonio.

This mail sent through IMP:

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]