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

Home » Public Forums » archive » mpfitfun
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
mpfitfun [message #89054] Sun, 20 July 2014 00:50 Go to next message
Nims is currently offline  Nims
Messages: 8
Registered: February 2014
Junior Member
Hi
I am using mpfitfun for fitting a first order polynomial: y = ax+b. To calculate the error on the polynomial, I am using "perror" given by mpfitfun. Could someone tell me which of the two values of perror (perror[0] and perror[1]) corresponds to which coefficient (a and b)?
Thank you.
Re: mpfitfun [message #89056 is a reply to message #89054] Sun, 20 July 2014 08:02 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den söndagen den 20:e juli 2014 kl. 09:50:51 UTC+2 skrev Nims:
> Hi
>
> I am using mpfitfun for fitting a first order polynomial: y = ax+b. To calculate the error on the polynomial, I am using "perror" given by mpfitfun. Could someone tell me which of the two values of perror (perror[0] and perror[1]) corresponds to which coefficient (a and b)?
>
> Thank you.

That depends on the function that returns the function you are fitting, the name of which you passed to mpfitfun. If it returns p[0] + p[1]*X (which would make sense to me) then perror[0] corresponds the error in b and perror[1] the error in a.

But if you made it return p[0]*X + p[1], then the order of the errors is the opposite.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MIN(), MAX() with NaN values
Next Topic: CDF and HDF5 problems

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

Current Time: Wed Oct 08 13:44:51 PDT 2025

Total time taken to generate the page: 0.00398 seconds