最小二乘参数拟合遇到的问题
用lsqlin命令进行参数拟合时总是给出如下提示,该怎么改进呢,请高人指点Optimization terminated: relative function value changing by less
than sqrt(OPTIONS.TolFun), and rate of progress is slow.
resnorm =
1.0465e+004
exitflag =
3
output =
iterations: 25
algorithm: 'large-scale: trust-region reflective Newton'
firstorderopt: 288.1820
cgiterations: 409
message: 最好把相关程序附上 看不懂,条件好像没有给似的
回复 沙发 sigma665 的帖子
clear;load Q;
=size(Q);
for r=1:m;
for i=1:n;
A(i,i)=Q(i,r);
for j=1:n;
s=n*i+j;
A(i,s)=-Q(i,r)*Q(j,r);
end
end
C(n*(r-1)+1:n*r,:)=A;
Y(n*(r-1)+1:n*r,1)=dQ(:,r);
end
lb=zeros(n*(n+1),1);
= lsqlin(C,Y,[],[],[ ],[ ],lb,[]);
save results x resnorm residual exitflag output lambda; 相当于生成了一个系数矩阵C和一组列向量Y,寻找x的最优解
页:
[1]