You can connect to a running MATLAB session and use all the variables in the MATLAB workspace.

To connect to a MATLAB session, MATLAB must be integrated with your modeling tool.


To connect a running MATLAB session


  • In the MATLAB command widow, execute the matlab.engine.shareEngine command.


After connecting to a MATLAB session, you can access variables in the MATLAB shared workspace that are not in the SysML v2 model. For example, you can define variables in MATLAB and then use them in calculations in your modeling tool.