User`s manual
4 Calling MATLAB from C and Fortran Programs
4-16
For example:
1 Shut down any MATLAB sessions.
2 From the Start button on the Windows menu bar, click Run.
3 In the Open field, type
d:\matlab\bin\win32\matlab.exe /Automation
where d:\matlab\bin\win32 represents the path to the MATLAB
executable.
4 Click OK. This starts MATLAB.
5 In MATLAB, change directories to $MATLAB/extern/examples/eng_mat,
where
$MATLAB is the MATLAB root directory.
6 Compile the engwindemo.c example.
7 Run the engwindemo program by typing at the MATLAB prompt
!engwindemo
This does not start another MATLAB session, but rather uses the MATLAB
session that is already open.
Note On the UNIX platform, you cannot make a MATLAB engine program
use a MATLAB session that is already running.