Calling fmincon from Simulink
问题 I am trying to implement a particular type of model predictive control in the Simulink-Matlab framework. To do so, my plan was to have the dynamic model in Simulink call an external Matlab S-function which in turns runs an optimization that calls a different Simulink file. Hence, the program flow would be as follows: Simulink -> Matlab ( fmincon or quadprog ) -> Simulink. As you can see, the Matlab S-function would call either fmincon or quadprog , but I would like to use fmincon for my