Warning of fmincon in algorithm options
显示 更早的评论
Hi everyone,
These days i am using the fmincon function to get the value of four unknowns from three equations. the objective function is to minimize the square sum of the three equations. However, when I run the codes, Matlab gives me the warning in the command window as

because i don't know how to supply the gradient in the objective function,thereby, I change the algorithm to "active-set". However, matlab still gives me totally the same warning in the command window. Even other algorithms of fmincon like 'interior-point' and 'sqp' also give me the same warning! I do not know why...
Could you give me some ways to deal with that ? Thanks very much!
回答(2 个)
Matt J
2013-12-11
0 个投票
the objective function is to minimize the square sum of the three equations
Sounds like you should be using FSOLVE rather than FMINCON. Are there any constraints that you haven't mentioned?
As for the warning, you probably have a bug in the code you think is selecting a different algorithm. We would need to see it, to have a better idea.
7 个评论
Stanley Cheng
2013-12-12
Matt J
2013-12-12
Then you should consider LSQNONLIN.
Stanley Cheng
2013-12-12
Matt J
2013-12-12
That's true, I didn't notice that your problem is under-determined. But since it is, I wonder how you can hope to get a meaningful solution out of it!
Stanley Cheng
2013-12-12
Matt J
2013-12-12
But because the equations are under-determined, it probably means you have a continuum of solutions. That means the solution you get will be unstable and can vary significantly if you run the code on different machines/processors or if your input data undergoes small changes or noise corruption.
Stanley Cheng
2013-12-12
类别
在 帮助中心 和 File Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!