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

Home » Public Forums » archive » Re: simultaneous 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: simultaneous fitting [message #56702] Sat, 10 November 2007 21:01 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
virgil1612@gmail.com writes:
> This is my first post here, so hi to everybody. As a disclaimer, I am
> a novice IDL user.
>
> I'm using LMFIT to make a chi square fitting of a function depending
> on some parameters to my data points, and it works great. But now the
> problem is that I need to simultaneously fit two functions depending
> on the same set of parameters to these points.
>
> I have no idea how to make the two functions simultaneous chi square
> fitting.
> Someone can help?


Fitting programs like LMFIT or MPFIT don't really care how many
functions you have. If you have two data sets Y1 and Y2, then you can
"glue" them together with a command like this,
Y = [Y1, Y2]
and in your model function, you would do the same thing, something
like,
F = [F1(X,P), F2(X,P)]
where F1() and F2() are your different functions, which are functions
of the same independent variable and the parameter set P.

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
Previous Topic: icontour scaling color table
Next Topic: iplot polar troubles

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

Current Time: Sat Oct 11 01:08:00 PDT 2025

Total time taken to generate the page: 0.07792 seconds