Run Engine Application on macOS
This example shows how to run the C example
engdemo.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:
X = 'hello'
MATLAB displays the results and closes.