MATLAB Application Program Interface
  Go to function:
    Search    Help Desk 
matGetMatrix    Examples

Reads mxArrays from MAT-files

Fortran Syntax

Arguments

mfp
  Pointer to MAT-file information.

name
  Name of mxArray to get from MAT-file.

Description

This routine allows you to copy an mxArray out of a MAT-file.

matGetMatrix reads the named mxArray from the MAT-file pointed to by mfp and returns a pointer to a newly allocated mxArray structure, or 0 if the attempt fails.

Be careful in your code to free the mxArray created by this routine when you are finished with it.

Examples

Write a simple 3-by-2 real mxArray into a MAT-file. Name the mxArray A and the MAT-file foo.mat.

To test, run this program; then go to MATLAB and enter:

See matdemo1.f in the eng_mat subdirectory of the examples directory for another sample program that illustrates how to use this MAT-file routine in a Fortran program.



[ Previous | Help Desk | Next ]