发新话题
打印

请教最小化函数fmincon函数问题

本主题由 QuantHR 于 2008-3-5 02:29 AM 移动

请教最小化函数fmincon函数问题

我想问一下,我在使用该函数的过程中,结果显示:
Optimization terminated:Magnitude of directional derivative was less than the specified tolerance and constraint violation was less than options.TolCon.
exitflag =4
那应该对该函数的 optimset进行怎么的修改才不会出现这种问题?
谢谢!!!

TOP

提示不是说了吗,less than the specified tolerance and less than options.TolCon,你相应把这2个值设置大一些。

出现这种问题一般要不就是函数和限制条件过于复杂,要不就是哪里你弄错了。


哦,我看错了,Exitflag=4,你的优化结果已经成功了啊。
Search Quantitative Finance Code
欢迎与本站友链
发帖前请看置顶帖+搜索历史旧帖

TOP

exitflag =4 给出的结果也是不错的...
对于某些函数,只能 exitflag =4
数学算法,人工智能;http://blog.csdn.net/aris_zzy

TOP

发新话题