@Carl Love Thanks for your help!
I have tried to turning the model into an arrow procedure and run it again.It seems the error is removed,but I can't get an answer.As showed below,there are some other new errors.
This is my new code!
datax := [-8, -4.5, -.5, 4.5, 8, 11.5, 14.5];
datay := [0.287e-2, 0.266e-2, 0.259e-2, 0.199e-2, 0.164e-2, 0.113e-2, 0.78e-3];
p1 := plot(datax, datay, style = point, symbol = solidcircle, color = blue, symbolsize = 12);
f := proc (x) options operator, arrow; int(tan(beta)^2*exp(-Pi*tan(beta)^2*((x-varepsilon)^2+varsigma^2)/eta^2)/eta^2, [eta = 22.83-sqrt((5.83+`ΔA`)^2-varepsilon^2) .. 22.83+sqrt((5.83+`ΔA`)^2-varepsilon^2), varepsilon = -5.83-`ΔA` .. 5.83+`ΔA`, varsigma = -1 .. 1])-(int(tan(beta)^2*exp(-Pi*tan(beta)^2*((x-varepsilon)^2+varsigma^2)/eta^2)/eta^2, [eta = 22.83-sqrt(5.83^2-varepsilon^2) .. 22.83+sqrt(5.83^2-varepsilon^2), varepsilon = -5.83 .. 5.83, varsigma = -1 .. 1])) end proc;
z := Statistics[NonlinearFit](f, datax, datay, x); p2 := plot(z, x = datax .. datax[-1], color = red);
Warning, calling NLPSolve as a constant objective function was found
Error, (in Statistics:-NonlinearFit) problem must have at least one variable
Error, (in plot) expected a range but received x = -8 .. 14.5
Error, (in plots:-display) expecting plot structure but received: p2
There must be some other mistakes in my code!How can I obtain correct parameter values?