用lsqcurvefit没能拟合出参数,求各位指教。代码如下。
Mostrar comentarios más antiguos
function f=XU(x,data)
XOD=data(1,:);
UA=data(2,:);
f=x(1)*(1+(x(2)*XOD)./(XOD+x(3)))-x(4)*UA
clc;
XOD=[13.920855 16.137478 18.802967 21.793845 19.668576 22.731821 23.275489 28.416212 30.66387];
UA=[34.723876 114.1186 91.402479 79.854949 77.639966 92.321463 104.54 96.047456 106.25276];
ydata=[10.4299978000000,-1.45032320000000,-0.425708066666667,0.0532981666666667,-0.00421063333333341,0.138016733333333,-0.0427233666666666,-0.0627239250000000,-0.0827244833333334];
data=[XOD;UA];
option=optimset('MaxFunEvals',50000000);
x0=[0.5 0.5 0.1 1];
[a,resnorm]=lsqcurvefit(@XU,x0,data,ydata,[0 0 0 0],[],option);
出现在命令栏中的提示如下:
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to
its initial value is less than the default value of the function tolerance.
<stopping criteria details>
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre 线性最小二乘 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!