Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

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

Viewing Functions in the Command Window
Viewing Functions in a GUI
Invoking Library Functions
Examples of Passing Data to Shared Libraries
Constructing a libpointer Object
Creating a Pointer to a Primitive Type
Creating a Pointer to a Structure
Example — Creating a Cell Array from a libpointer
Multilevel Pointers
Example of Passing a libstruct Object
Using the Structure as an Object

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
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

Using .NET Framework

Example — Using System Resources
Calling Nonstatic Methods
Calling Static Methods
What Classes Are in a .NET Assembly?
Example — Choosing a Method Signature
Example — Passing Arrays
Examples — Creating .NET Arrays
Examples — Creating .NET Arrays From Existing MATLAB Arrays
Example — Passing Data To a .NET Assembly
Example — Creating a MATLAB Array from a .NET Array
Example — Converting a Multidimensional .NET Array
Example — Accessing Elements of a .NET Array
Example — Setting .NET Array Elements with Set and SetValue
Example — Reading Data From a .NET Assembly
Example — Creating a Collection
Example — Converting a Collection to a MATLAB Array

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

Web Services

Example — createClassFromWsdl Function
Example — SOAP Functions

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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