Levenberg-Marquardt: funcs


cwen
12-19-2002, 08:07 AM
Hi,
I am trying to use mrqmin to fit a non-linear function. For the input funcs(float x,float a[], float *y, float dyda[], int na).
My function is like:
y = a[1] *exp(- ((a[2] - x)/a[3]).^2)
a[1], a[3] are two coefficient that I want to get from mrqmin.
But a[2] is a parameter as an input for funcs(). For example, I need it be: a[2] = 2. So I made ia[2] = 0. Is this to make a[2] fixed to what I want or I need set : dyda[2] = 0 ?
Thank you for your help.