comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: mpfit of parametric data?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: mpfit of parametric data? [message #40281] Wed, 28 July 2004 22:56 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"jamiesmyth_uni@yahoo.ca" <jamiesmyth_uni@yahoo.ca> writes:

> Thanks for your reply Craig. I think I have a handle on fitting both X
> and Y but I've taken a step backward this evening. I am having a very
> difficult time fitting even one of these time series and I'm not
> entirely sure why. I've read the FAQ again...
>
> Here is a quick and dirty example of what I observe. Essentially, I am
> completely unable to fit the sine oscillation unless I start with a
> very good first guess at the parameters. In particular, I cannot seem
> to fit both the linear trend and the oscillations. Can anyone take a
> stab at why this is so?

Greetings, this is not a big surprise. As I say on the FAQ page,
choosing the initial parameters is one of the key elements in getting
a good fit. This is especially true for an oscillatory function such
as yours, which can have multiple minima. Your initial guess, P1 =
[1,1,1,1,1], is too far from the global solution, so MPFIT gets
trapped at a different local minimum.

In these types of situations, you will probably have to proceed
iteratively. For example, first removing long term trends, then
fitting periodic signals. You may have to perform a Fourier transform
to locate periodic signals and to provide a good inital estimate of
the period/frequency.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Import Arc Export File to IDLffShape
Next Topic: Translate characters/string size to data/normal coordinates?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:52:35 PDT 2025

Total time taken to generate the page: 0.00474 seconds