Engine applications are standalone C/C++ or Fortran programs that allow you to call MATLAB from your own programs, using MATLAB as a computation engine. Engine applications require an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.
engOpen (C and Fortran) |
Start MATLAB engine session |
engOpenSingleUse
(C) |
Start MATLAB engine session for single, nonshared use |
engClose (C and Fortran) |
Quit MATLAB engine session |
Engine (C) |
Type for MATLAB engine |
engEvalString
(C and Fortran) |
Evaluate expression in string |
engGetVariable
(C and Fortran) |
Copy variable from MATLAB engine workspace |
engPutVariable
(C and Fortran) |
Put variable into MATLAB engine workspace |
engGetVisible
(C) |
Determine visibility of MATLAB engine session |
engSetVisible
(C) |
Show or hide MATLAB engine session |
engOutputBuffer
(C and Fortran) |
Specify buffer for MATLAB output |
mex |
Build MEX function from C/C++ or Fortran source code |
What you need to start building C/C++ or Fortran engine applications.
Introducing MATLAB Engine API for C/C++ and Fortran
Call MATLAB from your own C/C++ and Fortran programs, using MATLAB as a computation engine.
Call MATLAB Functions from C/C++ Applications
Create a C engine application engdemo.c
.
Call MATLAB Functions from Fortran Applications
Create a Fortran engine application fengdemo.F
.
Attach to Existing MATLAB Sessions
This example shows how to attach an engine program to a MATLAB session that is already running.
Design user interface callbacks to be evaluated in the context of the base workspace.
Set Run-Time Library Path on Windows Systems
At run time, tell the operating system where the API
shared libraries are by setting the Path
environment
variable.
Build Windows Engine Application
This example shows how to verify the build
process on Windows® platforms using the C example engwindemo.c
.
Run Windows Engine Application
This example shows how to run the C example, engwindemo.c
,
from the Windows system prompt.
Register MATLAB as a COM Server
Register MATLAB for every session, to ensure that the current version of MATLAB is the registered version. If you run older versions, the registered version could change.
Set Run-Time Library Path on Mac Systems
Tell the operating system where the API shared libraries
are by setting the DYLD_LIBRARY_PATH
environment
variable.
Build Mac OS X Engine Application
This example shows how to verify the build process on a Mac OS X platform.
This example shows how to run the C example engdemo.c
from the Mac Terminal Window.
Set Run-Time Library Path on Linux Systems
Tell the operating system where the API shared libraries
are by setting the LD_LIBRARY_PATH
environment
variable.
Build Linux Engine Application
This example shows how to verify the build process on a Linux® platform.
This example shows how to run the C example engdemo.c
from
the Linux system prompt.
Build Engine Applications with IDE
Tips to configure your integrated development environment to build engine applications.
What to do when MATLAB engine does not run.
Debug MATLAB Functions Used in Engine Applications
How to verify MATLAB functions used in engine applications.
MATLAB functions that interact with the user or disrupt program flow are not supported in engine applications.
MATLAB libraries are not thread-safe.