Dear group,
I find the NonlinearFit give an answer far away from the truth; Here
is an example:
Plot[100 Sin[3 x+1]+2,{x,0,5}];
data=Cases[Graphics[%],Line[x___]?x,Infinity];
<<Statistics`NonlinearFit`
NonlinearFit[data//First,A Sin[B x+C]+D,{x},{A,B,C,D}];
Plot[%,{x,0,5}]
ListPlot[data//First]
If i chop the +2 from above, it works fine. but The whole thing gives
bad fit again if you change {x,0,5}->{x,0,10}
So NonlinearFit also is not stable!
I hope it should be improved
Daohua