作业帮 > 综合 > 作业

matlab运行时,lsqcurvefit出现问题,

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/27 14:10:32
matlab运行时,lsqcurvefit出现问题,
出现问题提示如下:
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to its initial value is less than the selected value of the function tolerance.
Optimization stopped because the relative sum of squares (r) is changing
by less than options.TolFun = 1.000000e-008.
Optimization Metric
Optionsrelative change r = 3.23e-009 TolFun = 1e-008 (selected)
我的原代码段如下:
X0=[m_x,a_x,omega0,0]; %X初始值
lb=[-1,0,0,0]; ub=[1,1,inf,2*pi]; %X取值上下限
options=optimset('MaxFunEvals',2^12,'MaxIter',2^14,'TolX',1e-8,'TolFun',1e-8);
X=lsqcurvefit(@myfun,X0,t2,cos(beita_t),lb,ub,options);
你能把具体问题给我吗,看我能不能帮到你.lhmhz@qq.com
再问: 请问你是要整个程序代码还是?
再答: 拟合函数和m_x,a_x两组数据
再问: 发你邮箱了,收到没?帮忙看一下,实在整不出了。谢谢。
再答: 可以解,但不是最优解 m_x = 0.9232 a_x = 0.1173 Local minimum possible. lsqcurvefit stopped because the final change in the sum of squares relative to its initial value is less than the selected value of the function tolerance. X = -0.0753 1.0000 0.0935 0.0000 exitflag = 3