Re: Reconstructing data points from a InterpolatingFunction object
- To: mathgroup at smc.vnet.net
- Subject: [mg66576] Re: Reconstructing data points from a InterpolatingFunction object
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sat, 20 May 2006 04:48:01 -0400 (EDT)
- Organization: The University of Western Australia
- References: <e4bits$1a9$1@smc.vnet.net> <e4ella$9o6$1@smc.vnet.net> <e4jtte$d24$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <e4jtte$d24$1 at smc.vnet.net>, "Eckhard Schlemm" <e.schlemm at hotmail.de> wrote: > Thanks to your help - and the other answers of course - I managed to get > hold of the data points created by NDSolve to sample the > InterpolatingFunction..But still when I use NonlinearFit[] to fit a model to > these data the outcome is somewhat strange...for a listplot of data and a > plot of the "best fit function" clearly indicates that there are better > paramters to fit the model to the data....I think this problem has nothing > to do with from where I got the data points,,, Correct. > in my case from the InterpolatingFunction object but I don't think that > is the cause of this strange behavior. Correct. > Can you tell me, why ff[t] is so much different from the data points of > data?... Oh I almost forgot... it works properly for some values of a and > T... for example (a,T)=(.5 , 30) seems to work.. but others do not....for > instance (a,T)=(.7 , 30) yields a result which I cannot quite belief to be > the best fit.... NonlinearFit and FindFit are both sensitive to the choice of starting parameters. For a = 0.7, if you do NonlinearFit[data, a Sin[b t + g], t, {{a, 0.7}, {b, 1/2}, {g, Pi/2}}] you will get a much better fit. The solution to the differential equation looks like a Jacobi elliptic function. Also, you are fitting to a trig function -- so why not use Fourier methods to determine the amplitude and frequency? Cheers, Paul _______________________________________________________________________ Paul Abbott Phone: 61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) AUSTRALIA http://physics.uwa.edu.au/~paul