@acer hi, thanks for your help and give me some useful concepts, this time it works, I try my previous data fitting using Mathematica (see here v.txt , i.txt ) and compare the result from Maple. Using Mathematica repeating trying and get i0=1.7*10^(-7),n=1.22,rs=117.
> V := Vector(%, datatype = float);
> idata := Vector(%, datatype = float);
> dim := LinearAlgebra:-Dimension(V);
dim := 200
>NonlinearFit(i0*(exp((1000*(v-i*rs))/(25.9*n))-1)-i, ``(V, idata), Vector(dim),
[v, i], parameterranges = [i0 = 1.5*10^(-9) .. 2*10^(-5), rs = 1 .. 1000, n = 1 .. 5],
output = [residualsumofsquares, leastsquaresfunction]);
The picture is captured from my screen.
from exp(17.2368060494510*v)=exp(1000*v/n*25.9) →get n=(1000/17.2368060494510*25.9)=2.24
from exp(-1994.82773288428*i)=exp(-1000*rs*i/n*25.9) →get rs=115.731
substitute the result into Mathematica and execute, compare the reult of Mathematica and
Maple, plot together,from the picture shows that a discrepancy with original data,
although using Mathematica almost match well with original data, but it's time-consuming
work to try and try,finally get the result, next time I will use the complete long formula
to fitting other curve, I think I will spend a huge time to try the variables.
I want to know how to solve the problem to make the result match well with the
I have try to change the parameterranges, found that the residualsumofsquares will
change, according the definition from Wikipedia, it says "In statistics, the residual
sum of squares (RSS) is the sum of squares of residuals.
It is also known as the sum of squared residuals (SSR) or the sum of squared errors
of prediction (SSE). It is a measure of the discrepancy between the data and an
estimation model. A small RSS indicates a tight fit of the model to the data."
So,it is better to get a small residualsumofsquares value, how to minimize the value?
Thanks for your help, you really help me a lot.