79364329

Date: 2025-01-17 09:58:23
Score: 1
Natty:
Report link

Most simple approach would be using a MATLAB Function Block in Simulink. For example you can call the optimization routine usign a function call to Simulink Function - in case this is all Simulink. When simulation time is relevant for your optimization, model the loops in a Stateflow Chart. More elegant as well.

A third option is using For and While iterator subsystem (ports and subsystem library). As you played with them, you probably do not want to go this route.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: MonkeyProof Solutions