Is there a way to run fmincon from a MATLAB function block in Simulink?

3 次查看(过去 30 天)
Hello everyone,
I am trying to run a constrained nonlinear optimization problem in Simulink. The results of this optimization are used in a dynamical system that runs in the same file. I was wondering if anyone knows of a way to call fmincon from Simulink or, alternatively, a method to perform constrained optimization in Simulink.
Thanks in advance for your help.
Fernando

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-15
You can call it from Matlab function block
  1 个评论
Fernando
Fernando 2016-4-19
编辑:Fernando 2016-4-19
Hello Azzi,
Thanks a lot for your answer. Do you mean the Interpreted MATLAB Function Block or the MATLAB Function Block? I tried with the second but it did not let me use function handles to eventually call fmincon. Another question if you do not mind, do you know what would be the output of the block if the optimization algorithm has not finished yet?
Thanks again,
Fernando

请先登录,再进行评论。

类别

Help CenterFile 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!

Translated by