External Interfaces

Examples


Use this example index to jump to code examples in the documentation.

Importing and Exporting Data

Creating a MAT-File in C
Reading a MAT-File in C
Creating a MAT-File in Fortran
Reading a MAT-File in Fortran

MATLAB Interface to Generic DLLs

Invoking Library Functions
Converting to Other Primitive Types
Converting to a Reference
Strings
Enumerated Types
Passing a MATLAB Structure
Using the Structure as an Object
Example of Passing a libstruct Object
Using the libpointer Function
Creating a Reference to a Primitive Type
Creating a Structure Reference
Reference Pointers

Calling C and Fortran Programs from MATLAB

The explore Example
Examples from the Text
MEX Reference Examples
MX Examples
Engine and MAT Examples

Creating C Language MEX-Files

A First Example -- Passing a Scalar
Passing Strings
Passing Two or More Inputs or Outputs
Passing Structures and Cell Arrays
Handling Complex Data
Handling 8-,16-, and 32-Bit Data
Manipulating Multidimensional Numerical Arrays
Handling Sparse Arrays
Calling Functions from C MEX-Files
Persistent Arrays
Symmetric Indefinite Factorization Using LAPACK

Creating Fortran MEX-Files

A First Example -- Passing a Scalar
Passing Strings
Passing Arrays of Strings
Passing Matrices
Passing Two or More Inputs or Outputs
Handling Complex Data
Dynamically Allocating Memory
Handling Sparse Matrices
Calling Functions from Fortran MEX-Files

Calling MATLAB from C and Fortran Programs

Calling MATLAB from a C Application
Calling MATLAB from a Fortran Application

Calling Java from MATLAB

Concatenating Java Objects
Finding the Public Data Fields of an Object
Methodsview: Displaying a Listing of Java Methods
Creating an Array of Objects Within MATLAB
Creating a New Array Reference
Creating a Copy of a Java Array
Passing Java Objects
Converting to a MATLAB Structure
Converting to a MATLAB Cell Array
Reading a URL
Finding an Internet Protocol Address
Communicating Through a Serial Port
Creating and Using a Phone Book

COM and DDE Support

Writing Event Handlers
Using MATLAB as an Automation Client
Using COM Collections
Example -- Using Visual Basic and the MATLAB DDE Server
DDE Advisory Links

Serial Port I/O

Getting Started
Writing and Reading Text Data
Parsing Input Data Using strread
Reading Binary Data
Using Events and Callbacks
Connecting Two Modems
Recording Information to Disk
Saving and Loading