Re: MPFIT2DFUN [message #51034] |
Tue, 31 October 2006 09:22 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
"Steve" <Steve.Morris@libero.it> writes:
> Hi all,
>
> I'm using the excellent mpfit2dfun to fit a plane Z=f(X,Y) in the
> following way :
>
> myfit = MPFIT2DFUN('MYFORM', X, Y,Z,err_Z,start)
>
> It works very nicely, but I can only account for errors in Z. In the
> particular case I'm working with, I also have errors in X and Y. Is
> there any way to account for these errors? Or any other routine to use?
I don't have any great suggestions, but MPFIT2DFUN is definitely not
going to solve that problem. As Paolo mentioned, you might be able to
use the technique of Numerical Recipes extended to 2D, but I have a
feeling that won't work so well. The best suggestion I have is to use
the non-IDL code called ODRPACK.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: MPFIT2DFUN [message #51092 is a reply to message #51034] |
Tue, 31 October 2006 05:30  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
You may want to read the discussion in the
"numerical recipes in C" book, chapter 15.3 (freely
available on the web), for the two-dimensional
case (that is, a straight line fitting with
errors in x and y).
Ciao,
Paolo
Steve wrote:
> Hi all,
>
> I'm using the excellent mpfit2dfun to fit a plane Z=f(X,Y) in the
> following way :
>
> myfit = MPFIT2DFUN('MYFORM', X, Y,Z,err_Z,start)
>
> It works very nicely, but I can only account for errors in Z. In the
> particular case I'm working with, I also have errors in X and Y. Is
> there any way to account for these errors? Or any other routine to use?
>
> Thanks a lot!
> S.
>
|
|
|