Fitting with three parameters ??? [message #88760] |
Mon, 16 June 2014 03:49  |
atmospheric physics
Messages: 121 Registered: June 2010
|
Senior Member |
|
|
Hello,
I have two columns of data, say variables X and Y. Now I want to fit the data with a function Y = x1 - x2 * exp(-x3 * X). I do not know what the values of x1, x2 and x3.
Can anyone say if there is automatic way in IDL to define our fitting function and then obtain the fitted parameters to the data? How is non-linear fitting done in IDL? Also, I would like to know which function will be able to give me R2 correlation coefficient?
Thanks in advance,
Madhavan
|
|
|
|
Re: Fitting with three parameters ??? [message #88765 is a reply to message #88760] |
Mon, 16 June 2014 12:22  |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
There are dozens of ways to do this, the MPFIT library is just one (albeit a very good one). IDL has several functions for minimization and there are dozens more available else where.
http://www.exelisvis.com/docs/routines-47.html
Russell
On Monday, June 16, 2014 6:49:18 AM UTC-4, Madhavan Bomidi wrote:
> Hello,
>
>
>
> I have two columns of data, say variables X and Y. Now I want to fit the data with a function Y = x1 - x2 * exp(-x3 * X). I do not know what the values of x1, x2 and x3.
>
>
>
> Can anyone say if there is automatic way in IDL to define our fitting function and then obtain the fitted parameters to the data? How is non-linear fitting done in IDL? Also, I would like to know which function will be able to give me R2 correlation coefficient?
>
>
>
> Thanks in advance,
>
> Madhavan
|
|
|