Extrapolation using fft in octave

Posted by CFP on Stack Overflow See other posts from Stack Overflow or by CFP
Published on 2010-05-09T09:08:16Z Indexed on 2010/05/09 9:18 UTC
Read the original article Hit count: 484

Filed under:
|
|

Using GNU octave, I'm computing a fft over a piece of signal, then eliminating some frequencies, and finally reconstructing the signal. This give me a nice approximation of the signal ; but it doesn't give me a way to extrapolate the data.

Suppose basically that I have plotted three periods and a half of

f: x -> sin(x) + 0.5*sin(3*x) + 1.2*sin(5*x)

and then added a piece of low amplitude, zero-centered random noise. With fft/ifft, I can easily remove most of the noise ; but then how do I extrapolate 3 more periods of my signal data? (other of course that duplicating the signal).

The math way is easy : you have a decomposition of your function as an infinite sum of sines/cosines, and you just need to extract a partial sum and apply it anywhere. But I don't quite get the programmatic way...

Thanks!

© Stack Overflow or respective owner

Related posts about fft

Related posts about octave