Are any functions from the optimization toolbox available to Matlab Coder...excluding fminsearch and fzero
1 次查看(过去 30 天)
显示 更早的评论
I may need to use the Matlab Coder. Is fmincon available for code translation.
0 个评论
采纳的回答
José-Luis
2016-6-29
3 个评论
Walter Roberson
2016-6-29
fminsearch() does not handle constraints directly. You can build in penalties, but you will find that in practice it will sometimes get stuck in the penalty area. If you implement the penalty as returning inf then the interpolation will generate inf and you will be struck. If you implement the penalty as returning a fixed large non-inf value then that does not give any hint as to which direction it should head in, and it can get confused about which way to go. If you implement the penalty as adding a large constant value to what would otherwise be calculated (assuming it is just a forbidden region, not a region where complex numbers would be generated) then fminsearch will happily search for a minima in the penalty area if it happens to end up there.
Arwel
2016-12-14
编辑:Walter Roberson
2016-12-15
Hi,
I've used fminsearchbnd from the File Exchange for a while, and it seems to work very well. Cheers, Arwel
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!