Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

fmincon inside the function mdloutputs in s-function

Asked by Johanna Carolina Salazar on 19 Sep 2013

Why is I used the function fmincon inside mdlupdate, it return back to the simulink after finding the optimun point. While in the function mdloutput it neve stops... It keeps looking for an optimum solution and stop simulation

3 Comments

Kaustubha Govind on 19 Sep 2013

Could you try setting a breakpoint at the function call in both places to see how the inputs to FMINCON differ?

Johanna Carolina Salazar on 19 Sep 2013

considering the mdloutput function at time 0, what happen is that the function fmincon found the optimal solution at time 0, put sys=point computed, and then restart and compute again the optimal solution at time 0. The simulation doesn't go ahead.

Johanna Carolina Salazar on 19 Sep 2013

It is like it nevers go out from mdloutputs after finding the solution... and restart again

Johanna Carolina Salazar

Products

0 Answers

Contact us