External Interfaces/API

External Interfaces/API


MATLAB® provides interfaces to external routines written in other programming languages, data that needs to be shared with external routines, clients or servers communicating via Component Object Model (COM) or Dynamic Data Exchange (DDE), and peripheral devices that communicate directly with MATLAB. Much of this interface capability was formerly referred to under the title of the MATLAB Application Program Interface, or API.
This section introduces the external interfaces that are available with MATLAB. It also contains numerous C and Fortran examples that highlight this functionality. The topics included are
Calling C and Fortran Programs from MATLAB
Describes how to build C and Fortran subroutines into callable MEX files.
Creating C Language MEX-Files
Shows the components of a C MEX-file and provides specific examples of MEX-files written in C.
Creating Fortran MEX-Files
Shows the components of a Fortran MEX-file and provides specific examples of MEX-files written in Fortran.
Calling MATLAB from C and Fortran Programs
Discusses how to use the MATLAB engine library to call MATLAB from C and Fortran programs.
Calling Java from MATLAB
Describes how to use the MATLAB interface to Java classes and objects.
Importing and Exporting Data
Describes techniques for importing data to and exporting data from the MATLAB environment using MAT-files.
COM and DDE Support
Describes how to use Component Object Model (COM) and Dynamic Data Exchange (DDE) with MATLAB.
Serial Port I/O
Describes how to communicate with peripheral devices such as modems, printers, and scientific instruments that you connect to your computer's serial port.


 Calling C and Fortran Programs from MATLAB