Examples


Use this list to find 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
Constructing a Reference with 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
Example — 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® Software from a C Application
Calling MATLAB® Software from a Fortran Application
Attaching to an Existing MATLAB® Session
Example — Building an Engine Application on Windows® System
Example — Building an Engine Application on UNIX® Systems

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 in MATLAB® Software
Creating a New Array Reference
Creating a Copy of a Java™ Array
Passing Java™ Objects
Example — Calling an Overloaded Method
Converting to a MATLAB® Structure
Converting to a MATLAB® Cell Array
Example — Reading a URL
Example — Finding an Internet Protocol Address
Example — Creating and Using a Phone Book

COM Support

Example — Using Internet Explorer® Program in a MATLAB® Figure
Example — Grid ActiveX® Control in a Figure
Example — Reading Excel® Spreadsheet Data
Using a MATLAB® Application as an Automation Client
Using COM Collections
Example — Running an M-File from Visual Basic® .NET Program
Example — Viewing Methods from a Visual Basic® .NET Client
Example — Calling MATLAB® Software from a Web Application
Example — Calling MATLAB® Software from a C# Client

Serial Port I/O

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

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS