MATLAB: Access Simulink Solver in S-Function


How can I access the Simulink Solver(Integrator) and other Configuration Parameters (StepWidth, Starttime, Stoptime) within a s-function? So far I just found a solution using gcs but I hope theres another/better way.

Best Answer

  • To access the Simulink solver, you ve to set up the continus states and write the fucntion mdlDerivative.