can we interface simulink with matlab code?
3 views (last 30 days)
Tamir Suliman on 26 Feb 2018
Edited: Walter Roberson on 26 Feb 2018
you can configure Model Callback Functions to call MATLAB code at specific times in the model lifetime. You can use PostLoadFcn to call something right after a model has been loaded, and InitFcn to call during model update, or right before simulation.
You can run MATLAB-file during simulation (as if it were one of the blocks) using the Interpreted MATLAB Function, but initial conditions are needed at the beginning of simulation, so using the InitFcn callback is a better place to do that.