I tried modifying the "lsfit_d_nlf" example of the .net ALGLIB library under C# and VB to fit a single-exponential decay curve.
y=a+b*exp(-c*x)
Please see the attached figure for the details. Basically, I first generate the data with pre-specified coefficients a=1.4, b=4.5, c=0.54 under the two platforms, and do the unweighted fitting. Under C#, the library works flawlessly and gives me (a,b,c)=(1.4,4.5,0.54). Under VB, the fitted results are (a,b,c) = (1.25,3.72,0.39), which is far from desirable.
Does anyone know why there is such a discrepancy? Any suggestion to solve this issue will be appreciated!
Attachments: |
File comment: Fitting results under 2 platforms
alglib.png [ 36.32 KiB | Viewed 3861 times ]
|
|