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

Home » Public Forums » archive » Re: 3D Curve Fitting
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: 3D Curve Fitting [message #62729] Thu, 02 October 2008 09:05 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Wox <nomail@hotmail.com> writes:

> On 01 Oct 2008 13:07:37 -0400, Craig Markwardt
> <craigmnet@REMOVEcow.physics.wisc.edu> wrote:
>
>> Wox <nomail@hotmail.com> writes:
>>>
>>> Sorry for the confusing, it must be: "If you have 3 DEPENDENT
>>> variables, you can't use mpfit or curvefit or whatever"
>>
>> I don't think your claim is correct. If you have the independent
>> variable, X, and *two* measurements per X point, (say Y and Z) then it
>> is straightforward to fit both of those points simultaneously. That
>> is effectively fitting a 2D function. The method is the same,
>> MPFITFUN('MYFUNCT', X, [Y, Z], [ERR_Y, ERR_Z], ...)
>> and your function is responsible for computing both functions
>> separately and then stacking them together.
>
> Yes, you're right, but what if X would be measured too?

Well as I said, you need to define your problem first. MPFIT solves
the chi-square problem, so if you can rigorously define how the
chi-square value is calculated for your case, then MPFIT will solve
for the best parameters.

If all "X" "Y" and "Z" are measured values, then you no longer have a
simple chi-square problem. The closest technique to solve this kind
of problem is orthogonal distance regression (ODRPACK, in FORTRAN).
But even with ODR you need to be able to define in a formal way how
the function and chi-square are calculated.

Happy fitting,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: cbmarkwardt+usenet@gmail.com
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Updates to Popular Coyote Library Programs
Next Topic: Re: Venn diagram?

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

Current Time: Thu Oct 09 23:54:54 PDT 2025

Total time taken to generate the page: 0.72115 seconds