matlabsimulinkrtw

How to call an m-script from .tlc file


I have a requirement to call an m script when the build button is clicked after selecting a target in real time workshop. Can anyone suggest, how this can be accomplished ? Also I have to pass the name of the simulink model in this m script. Is there a function to extract the name of the current simulink model?

Thanks for your help in advance.


Solution

  • Use bdroot or gcs to get the name of the Simulink model. Not sure about calling a MATLAB script as part of the build.