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

Home » Public Forums » archive » More problems with Curvefit
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: More problems with Curvefit [message #35711 is a reply to message #35619] Mon, 30 June 2003 11:43 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Paul van Delst <paul.vandelst@noaa.gov> writes:
> Try doing
> w = make_array(12, value = 1.0 )
> or
> w = replicate( 1.0, 12 )
> to actually give you a vector for w. The IDL documentation is a wee bit misleading here as
> the actual words say "For no weighting, set Weightsi = 1.0" where the "i" suffix is an
> indicator that Weights is an array but it's not entirely clear (to me at least.)

As a side note, MPCURVEFIT, and the other "MP" fitting programs can
accept either a scalar or a vector for the uncertainties or weights.
Either way it does the "right thing." And of course the MP fitting
programs do not necessarily require the user to compute function
derivatives.

To Heather Williams, the original poster, you should be aware that
your fitting function is degenerate, since it contains a linear
combination of the *same* basis function. This leads to a singular
normal matrix, and takes a canned routine like CURVEFIT on a trip to
la-la land. This effect is further exacerbated by the choice of
initial conditions (both coefficients equal). MPCURVEFIT is more
robust in this sense, since it will do a singular value decomposition
in the face of a singular matrix.


Happy fitting!
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Format Code Question
Next Topic: IDL from crontab going defunct?

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

Current Time: Wed Oct 08 19:03:55 PDT 2025

Total time taken to generate the page: 0.00362 seconds