Borrar filtros
Borrar filtros

Are any functions from the optimization toolbox available to Matlab Coder...excluding fminsearch and fzero

2 visualizaciones (últimos 30 días)
I may need to use the Matlab Coder. Is fmincon available for code translation.

Respuesta aceptada

José-Luis
José-Luis el 29 de Jun. de 2016
  3 comentarios
Walter Roberson
Walter Roberson el 29 de Jun. de 2016
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
Arwel el 14 de Dic. de 2016
Editada: Walter Roberson el 15 de Dic. de 2016
Hi,
I've used fminsearchbnd from the File Exchange for a while, and it seems to work very well. Cheers, Arwel

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by