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

Home » Public Forums » archive » Re: What is the difference between 'curvefit', 'lmfit' and 'svdfit' procudure?
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: What is the difference between 'curvefit', 'lmfit' and 'svdfit' procudure? [message #52897 is a reply to message #52893] Wed, 07 March 2007 18:07 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"duxiyu@gmail.com" <duxiyu@gmail.com> writes:
> Thank you very much!
> I have download the MPFIT package.
> Now I'm studying it. ^_^
> But in your package there is not procedure named 'MPEVALEXPR' which is
> in the sentence 'yfit = MPEVALEXPR(expr, x, p) Expression named expr'.

It's hidden inside mpfitexpr.pro, and only needed if you want to
evaluate a user expression for parameter values *other* than the best
fit values. Given that most people would use MPFITEXPR()
interactively from the command line, this is not a problem. (You can
also use 'forward_function mpevalexpr' to make sure it is available in
canned a script.) This is of course not an issue with MPFITFUN(),
which I recommended.

> By the way, I wonder the difference between LMFIT and CURVEFIT very
> much.
> Are their function the same as each other?

CURVEFIT - poor man's non-linear least squares original to IDL, based
on gradient expansion and not really robust.
LMFIT - probably more robust non-linear least squares with
Levenberg-Marquardt technique. It still has some fatal
flaws, like evaluating the user function one point at a time.
This routine was released after MPFIT.
LINFIT - for fitting a straight line to XY data only.
POLY_FIT - for fitting a polynomial to XY data.
SVDFIT - for fitting a linear combination of any basis functions.
LADFIT - for fitting a straight line, but *not* least squares
(more robust against outliers)

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
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: strange behaviour of ladfit - known?
Next Topic: using Container object for Strings?

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

Current Time: Sat Oct 11 10:30:52 PDT 2025

Total time taken to generate the page: 0.95738 seconds