Main Content

matGetVariableInfo (C and Fortran)

Array header information only

C Syntax

#include "mat.h" mxArray *matGetVariableInfo(MATFile *mfp, const char *name);

Fortran Syntax

# include“mat.h mwPointer matGetVariableInfo (mfp, name) mwPointer mfp character*(*) name

Arguments

mfp

Pointer to MAT-file information

name

Name ofmxArrayto get from MAT-file

Returns

Pointer to a newly allocatedmxArraystructure representing header information for themxArraynamed bynamefrom the MAT-file pointed to bymfp.

matGetVariableInforeturnsNULLin C (0in Fortran) if the attempt to return header information for themxArraynamed bynamefails.

Description

matGetVariableInfoloads only the array header information, including everything except公关,pi,ir, andjc. It recursively creates the cells and structures through their leaf elements, but does not include公关,pi,ir, andjc.

If公关,pi,ir, andjcare nonzero values when loaded withmatGetVariable,matGetVariableInfosets them to-1instead.These headers are for informational use only.Neverpass this data back to the MATLAB®workspace or save it to MAT-files.

UsemxDestroyArrayto destroy themxArraycreated by this routine when you are finished with it.

Examples

See these examples inmatlabroot/extern/examples/eng_mat:

See Also

matGetVariable

Version History

Introduced before R2006a