lsqnonlin函数使⽤⽅法
lsqnonlin
x = lsqnonlin(fun,x0) %x0
funfun
x = lsqnonlin(fun,x0,lb,ub) %lb
x = lsqnonlin(fun,x0,lb,ub,options) %options
[x,resnorm] = lsqnonlin(
[x,resnorm,residual] = lsqnonlin(
[x,resnorm,residual,exitflag] = lsqnonlin(
[x,resnorm,residual,exitflag,output] = lsqnonlin(
[x,resnorm,residual,exitflag,output,lambda] = lsqnonlin(
[x,resnorm,residual,exitflag,output,lambda,jacobian] =lsqnonlin(
matlab中lsqnonlin使⽤⽅法如下:
x = lsqnonlin(fun,x0)
x = lsqnonlin(fun,x0,lb,ub)
x = lsqnonlin(fun,x0,lb,ub,options)
[x,resnorm] = lsqnonlin(...)
[x,resnorm,residual] = lsqnonlin(...)
[x,resnorm,residual,exitflag] = lsqnonlin(...)
[x,resnorm,residual,exitflag,output] = lsqnonlin(...)
[x,resnorm,residual,exitflag,output,lambda] =lsqnonlin(...)[x,resnorm,residual,exitflag,output,lambda,jacobian]= lsqnonlin(...)注:
1.lsqnonlin解决问题,包含⾮线性数据的拟合问题
2.fun包含返回值为⼀个向量,该向量包含了各个求和的分量(以便于找到使⽬标最⼩的可⾏解)。
3.各参数可做为在中事先给出,也可传递得到(参数表加到lsqnonlin的后⾯,当然除了调⽤时候系统会使⽤的反复的参数)。
4.不选的可致空集。(其中初值⼀般要有。lb,ub,option可空,即【】)