Fourier series interpolation
- To: mathgroup at smc.vnet.net
- Subject: [mg41889] Fourier series interpolation
- From: Bob.Buchanan at millersville.edu (Bob Buchanan)
- Date: Sun, 8 Jun 2003 06:45:51 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
If I use my own DFT function I can create an interpolatory least
squares polynomial for a set of discrete data points. For example if
my input data is the list:
data = {0.7630, -0.1205, -0.0649, 0.6133, -0.2697, -0.7216, -0.0993,
0.9787, -0.5689, -0.1080, -0.3685, 0.0293};
and
MyFourier[f_List] :=
Module[{tmp},
tmp = Table[
Exp[-2 Pi I n k/Length[f]], {n, -Length[f]/2 + 1, Length[f]/2,
1}, {k, -Length[f]/2 + 1, Length[f]/2, 1}]; tmp.f/Length[f]]
Then
fdata = Chop[MyFourier[data]]
produces
{0.06838\[InvisibleSpace] - 0.109318 \[ImaginaryI], -0.168383 +
0.0684882 \[ImaginaryI], -0.214283 - 0.0380917 \[ImaginaryI],
-0.060625 +
0.119425 \[ImaginaryI], -0.0418217 -
0.0547732 \[ImaginaryI], 0.00524167, -0.0418217 +
0.0547732 \[ImaginaryI], -0.060625 - 0.119425 \[ImaginaryI],
-0.214283 +
0.0380917 \[ImaginaryI], -0.168383 - 0.0684882 \[ImaginaryI],
0.06838\[InvisibleSpace] + 0.109318 \[ImaginaryI], 0.106625}
I can then create the Fourier polynomial with
Chop[ExpToTrig[
fdata.Table[
Exp[I 2Pi k x], {k, -Length[fdata]/2 + 1, Length[fdata]/2,
1}]]]
How do I create the Fourier polynomial from the output of
Mathematica's Fourier[] command with the default settings for the
FourierParameters?
Thanks,
Bob Buchanan