Question: How can I obtain nonlinear parameters with NonlinearFit or any other ways

Hello everyone.

Now, I am studying nonlinear fitting method through help file of maple. Unfortunately, I'm not getting good fit using NonliearFit. The following is my psocedure:

> restart;
> with(Statistics);
> y := 1/(3.6+2.3*x)+17.6*exp(-0.2*x);
> fy := unapply(y, x);
> for x to 10 do fy(x) end do;
14.5791527795
11.9195840297
9.75432289049
7.98631476846
6.54090333018
5.35848939402
4.39086798669
3.59883326216
2.95041269607
2.41949496992
>
> MXY := Matrix(10, 2);
MXY := Matrix(10, 2, {}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])
> for i to 10 do MXY[i, 1] := i; MXY[i, 2] := fy(i) end do;
> MXY;
> f := proc (p, v, i) 1/(p[1]+p[2]*v[i, 1])+p[3]*exp(-p[4]*v[i, 1])-v[i, 2] end proc;
> NonlinearFit(4, f, MXY);
Vector[column](4, {(1) = 0.4159556403222145113025311269579483624456e-1, (2) = 0.2389166980416446884975247005637575077337e-1, (3) = -6.025903725941396074925088749319827381777, (4) = 874.8356687995214899129045697734503770704}, datatype = sfloat, storage = rectangular, order = Fortran_order, shape = [])

My questions:

1, Are there any issues in procedure? How to correct?

2,How can I do with other ways in maple software?

3,In general, normal way?

Thanks!

 

Please Wait...