MATLAB Runtime Server    

Preparing the Example Files

The example consists of these nine files, located in the toolbox\runtime\examples\engineAPI directory.

File
Description
Readme_win, Readme_unix
Platform-specific ASCII file with information about the example
DrawAppWin.c, DrawApp.c
Platform-specific C file
myapp.m
MATLAB Runtime Server application files
myapp_draw.m
myapp_erase.m
myapp_error.m
myapp_quit.m
matlabrt.m
MATLAB Runtime Server startup files
pathdefrt.m

C File.   Compile and link the C program, DrawApp.c, which is in the directory toolbox\runtime\examples\engineAPI. Keep the compiled file in the same directory.

For example, on Solaris machines, use these two commands at the system prompt.

Here, matlabroot is the directory in which MATLAB is installed.

As another example, on Windows NT 4.0 using Microsoft Visual C 6.0, execute the following commands at the MATLAB prompt.

MATLAB Startup Functions.   Move matlabrt.m and pathdefrt.m into the toolbox\local directory of your development copy of MATLAB, alongside the matlabrc.m and pathdef.m files.

MATLAB Application Files.   To prepare to use these files, start MATLAB and execute this command.

Since the runtime P-files that you create will reside in the toolbox\runtime\examples\engineAPI directory, it is important that this directory is either:

In this example, toolbox\runtime\examples\engineAPI is the directory from which the C program will launch MATLAB.

On PC platforms, you should also modify the DOS path so that MATLAB can find all the files it needs. At the DOS prompt, type

where matlabroot is the directory in which MATLAB is installed.


  Engine API Example Adapting the Design for Runtime Execution