xuelzb 发表于 2010-10-4 06:47:18

改变初值,fmincon 拟合的结果会好么?

我用fmincon 拟合微分方程组的参数,总是得到如下信息:
No feasible solution found.
fmincon stopped because the size of the current search direction is less than
twice the default value of the step size tolerance but constraints were not
satisfied to within the default value of the constraint tolerance.
exitflag =
    -2
output =
         iterations: 2
          funcCount: 8
       lssteplength: 1
         stepsize: 1.1146e-016
          algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'
      firstorderopt: 5.2408e+004
    constrviolation: 5.0000e-004
            message:
我唯一能做的就是修改初始值,重新拟合。可是结果还是这样. 听说matlab
的优化算法不好,可以下载什么优化算法软件包,用在matlab
里么?

lengyunfeng 发表于 2010-10-4 09:09:24

lz还是先去看看书再用matlab吧。fmincon这个函数应该是指用在找有约束条件下函数的极值上,不能用在拟和上。你要想用拟和的话可以用nlinfit试试
页: [1]
查看完整版本: 改变初值,fmincon 拟合的结果会好么?