Run Engine Application on macOS - MATLAB & Simulink (original) (raw)
Main Content
This example shows how to run the C exampleengdemo.c
from the macOS Terminal Window. Make note of the value of_matlabroot
_, the folder where MATLABĀ® is installed.
Set the system path. Make sure that you include the :
path terminator character.
setenv PATH matlabroot/bin:$PATH
Set the run-time library path and run the example.
DYLD_LIBRARY_PATH=matlabroot/bin/macos:matlabroot/sys/os/macos ./engdemo
Replace macos
with either maca64
for macOS with Apple silicon or maci64
for macOS with IntelĀ®. For more information, see Set Run-Time Library Path on macOS Systems. The example assumes that the engdemo
application is on your system path.
MATLAB starts and displays a figure. To close the figure, press Return.
Create variable X
, for example:
MATLAB displays the results and closes.