Using Syndeia with Simulink & Stateflow.

Users have two options to interact with the MATLAB environment (including Simulink and Stateflow). Beyond the instructions below, no further action is needed. During installation, Syndeia will automatically install the libSimulink folder.

API-based interaction (preferred)

Syndeia offers a faster API-based interaction with the MATLAB environment. We strongly recommend using this mode with Syndeia if you are using MATLAB / Simulink / Stateflow 2016b and later. Follow the steps below to configure Syndeia to use this mode.

(1) Set the path to MATLAB Engine - On Windows, you need to add the folder <matlabroot>\bin\win64 at the beginning of the Path environment variable value. Replace <matlabroot> with the location of MATLAB installation on your computer. To do this, go to Control Panel > System and Security > System > Advanced Settings. Click on the Environment Variables button, select the Path variable under System Variables, and add the location <matlabroot>\bin\win64 at the top of the list, as shown below.




(2) Set the location of MATLAB win64 folder in Syndeia.hep file - Open the Syndeia.hep file located in <Syndeia_Installation>\profiles\Syndeia folder, e.g C:\Users\<YourAccount>\IBM\Rational\Rhapsody\<version>\Share\Profiles\Syndeia\profiles\Syndeia. Specify the location of win64 folder in your MATLAB installation in the value of JavaLibPath1 variable, as highlighted below. Save and close the Syndeia.hep file.


 

(3) Place MATLAB engine.jar file in libMATLAB folder - Create a libMATLAB folder in <YourAccount>\IBM\Rational\Rhapsody\<version>\Share\Profiles\Syndeia. Replace <version> with the location of Rhapsody installation on your computer. Then navigate to <matlabroot>\extern\engines\java\jar and copy the engine.jar file, then paste into the libMATLAB folder you created. This <matlabroot> must be the same one used for (1) above.



(4) Syndeia Settings - Set both Use MATLAB Engine API and Use existing MATLAB session to true in Syndeia's MATLAB settings after you have installed Syndeia.

File-based interaction

Syndeia continues to provide the existing file-based interaction with the MATLAB environment (like Syndeia 3.0). If you have a version of MATLAB / Simulink / Stateflow earlier than 2016b, use this mode. To use this mode, set the path to the MATLAB executable (e.g. matlab.exe on Windows) in Syndeia's MATLAB settings after you have installed Syndeia. If you do not specify the path, then the default MATLAB installed on your computer will be used. We recommend that you specify this path so there is no ambiguity in the MATLAB installation Syndeia should use, especially if you have multiple versions of MATLAB installed.