Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Interpolation with FourierTrigSeries with mathematica 6 tia sal2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88504] Re: [mg88424] Interpolation with FourierTrigSeries with mathematica 6 tia sal2
  • From: "W_Craig Carter" <ccarter at mit.edu>
  • Date: Tue, 6 May 2008 06:46:39 -0400 (EDT)
  • References: <200805051012.GAA08290@smc.vnet.net>

Hello,
I believe problem is your data and the request for periodic numeric
interpolation.
(The message window reveals the warning).
data2 is not periodic:

The following works, but has some difficulties with convergence of the
numerical integration:

lp = ListPlot[data3]

f = Interpolation[data3, PeriodicInterpolation -> True]

pf = Plot[f[x], {x, 0, 139}]

fs = N[FourierTrigSeries[f[x], x, 25,    FourierParameters -> {-1, 1/139}]]

fp = Plot[fs, {x, 0, 138}]

Show[lp, fp, pf]

>   When I change different data points to the code example:
>
>   data2 = {{0, 0}, {1, 1}, {3, 0}, {7, -2}, {14, 1}, {17, 6}, {19, -2},
>  {25, -6}, {34, 6}, {41, 4}, {49, -6}, {56, -5}, {63, 4}, {69, 3}, {74,
>  -5}, {77, -3}, {86, 3}, {90, 7}, {95, -3}, {96, -8}, {103, 7}, {112,
>  9}, {120, -8}, {129, -9}, {138, 9}};
>
>         f = Interpolation[data2, PeriodicInterpolation -> True];
>         << "FourierSeries`"
>
>         s[x_] = N[
>   FourierTrigSeries[f[x], x, 25, FourierParameters -> {-1, 1/138}]]
>
>   my partial output becomes :
>
>   0.00729927 NIntegrate[
>    Interpolation[{{0, 0}, {1, 1}, {3, 0}, {7, -2}, {14, 1}, {17,


-- 
W. Craig Carter


  • Prev by Date: Re: Hash Table for self avoiding random walks
  • Next by Date: Re: 32-bit front-end on 64-bit machine
  • Previous by thread: Interpolation with FourierTrigSeries with mathematica 6 tia sal2
  • Next by thread: Re: Interpolation with FourierTrigSeries with mathematica 6 tia sal2