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
Direct link to this comment:
Could you try setting a breakpoint at the function call in both places to see how the inputs to FMINCON differ?
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.
It is like it nevers go out from mdloutputs after finding the solution... and restart again
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries