LIBMATIO API 1.3.4
Defines | Functions
Internal Functions

Defines

#define swap(a, b)   a^=b;b^=a;a^=b
 swap the bytes a and b

Functions

int InflateArrayFlags (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the Array Flags Tag and the Array Flags data.
int InflateData (mat_t *mat, z_stream *z, void *buf, int nBytes)
 Inflates the data.
int InflateDataTag (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the data's tag.
int InflateDataType (mat_t *mat, z_stream *z, void *buf)
 Inflates the data's type.
int InflateDimensions (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the dimensions tag and the dimensions data.
int InflateFieldNameLength (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the structure's fieldname length.
int InflateFieldNames (mat_t *mat, matvar_t *matvar, void *buf, int nfields, int fieldname_length, int padding)
 Inflates the structure's fieldnames.
int InflateFieldNamesTag (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the structure's fieldname tag.
int InflateSkip (mat_t *mat, z_stream *z, int nbytes)
 Inflate the data until nbytes of uncompressed data has been inflated.
int InflateSkip2 (mat_t *mat, matvar_t *matvar, int nbytes)
 Inflate the data until nbytes of compressed data has been inflated.
int InflateSkipData (mat_t *mat, z_stream *z, int data_type, int len)
 Inflate the data until len elements of compressed data with data type data_type has been inflated.
int InflateVarName (mat_t *mat, matvar_t *matvar, void *buf, int N)
 Inflates the variable name.
int InflateVarNameTag (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the variable name tag.
int InflateVarTag (mat_t *mat, matvar_t *matvar, void *buf)
 Inflates the variable's tag.
double Mat_doubleSwap (double *a)
 swap the bytes of a 4 or 8 byte double-precision float
float Mat_floatSwap (float *a)
 swap the bytes of a 4 byte single-precision float
mat_int16_t Mat_int16Swap (mat_int16_t *a)
 swap the bytes of a 16-bit signed integer
mat_int32_t Mat_int32Swap (mat_int32_t *a)
 swap the bytes of a 32-bit signed integer
mat_int64_t Mat_int64Swap (mat_int64_t *a)
 swap the bytes of a 64-bit signed integer
mat_uint16_t Mat_uint16Swap (mat_uint16_t *a)
 swap the bytes of a 16-bit unsigned integer
mat_uint32_t Mat_uint32Swap (mat_uint32_t *a)
 swap the bytes of a 32-bit unsigned integer
mat_uint64_t Mat_uint64Swap (mat_uint64_t *a)
 swap the bytes of a 64-bit unsigned integer
void Mat_VarPrint5 (matvar_t *matvar, int printdata)
 Prints the mat variable.
matvar_tMat_VarReadNextInfo5 (mat_t *mat)
 Reads the header information for the next MAT variable.
void Read5 (mat_t *mat, matvar_t *matvar)
 Reads the data of a version 5 MAT variable.
int ReadCompressedCharData (mat_t *mat, z_stream *z, char *data, int data_type, int len)
 Reads data of type data_type into a char type.
int ReadCompressedDataSlab2 (mat_t *mat, z_stream *z, void *data, int class_type, int data_type, int *dims, int *start, int *stride, int *edge)
 Reads data of type data_type by user-defined dimensions for 2-D data.
int ReadCompressedDataSlabN (mat_t *mat, z_stream *z, void *data, int class_type, int data_type, int rank, int *dims, int *start, int *stride, int *edge)
 Reads data of type data_type by user-defined dimensions.
int ReadCompressedDoubleData (mat_t *mat, z_stream *z, double *data, int data_type, int len)
 Reads data of type data_type into a double type.
int ReadCompressedInt16Data (mat_t *mat, z_stream *z, mat_int16_t *data, int data_type, int len)
 Reads data of type data_type into a signed 16-bit integer type.
int ReadCompressedInt32Data (mat_t *mat, z_stream *z, mat_int32_t *data, int data_type, int len)
 Reads data of type data_type into a signed 32-bit integer type.
int ReadCompressedInt64Data (mat_t *mat, z_stream *z, mat_int64_t *data, int data_type, int len)
 Reads data of type data_type into a signed 64-bit integer type.
int ReadCompressedInt8Data (mat_t *mat, z_stream *z, mat_int8_t *data, int data_type, int len)
 Reads data of type data_type into a signed 8-bit integer type.
int ReadCompressedSingleData (mat_t *mat, z_stream *z, float *data, int data_type, int len)
 Reads data of type data_type into a float type.
int ReadCompressedUInt16Data (mat_t *mat, z_stream *z, mat_uint16_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 16-bit integer type.
int ReadCompressedUInt32Data (mat_t *mat, z_stream *z, mat_uint32_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 32-bit integer type.
int ReadCompressedUInt64Data (mat_t *mat, z_stream *z, mat_uint64_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 64-bit integer type.
int ReadCompressedUInt8Data (mat_t *mat, z_stream *z, mat_uint8_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 8-bit integer type.
int ReadData5 (mat_t *mat, matvar_t *matvar, void *data, int *start, int *stride, int *edge)
 Reads a slab of data from the mat variable matvar.
int ReadDataSlab2 (mat_t *mat, void *data, int class_type, int data_type, int *dims, int *start, int *stride, int *edge)
 Reads data of type data_type by user-defined dimensions for 2-D data.
int ReadDataSlabN (mat_t *mat, void *data, int class_type, int data_type, int rank, int *dims, int *start, int *stride, int *edge)
 Reads data of type data_type by user-defined dimensions.
int ReadDoubleData (mat_t *mat, double *data, int data_type, int len)
 Reads data of type data_type into a double type.
int ReadInt16Data (mat_t *mat, mat_int16_t *data, int data_type, int len)
 Reads data of type data_type into a signed 16-bit integer type.
int ReadInt32Data (mat_t *mat, mat_int32_t *data, int data_type, int len)
 Reads data of type data_type into a signed 32-bit integer type.
int ReadInt64Data (mat_t *mat, mat_int64_t *data, int data_type, int len)
 Reads data of type data_type into a signed 64-bit integer type.
int ReadInt8Data (mat_t *mat, mat_int8_t *data, int data_type, int len)
 Reads data of type data_type into a signed 8-bit integer type.
int ReadNextCell (mat_t *mat, matvar_t *matvar)
 Reads the next cell of the cell array in matvar.
int ReadNextFunctionHandle (mat_t *mat, matvar_t *matvar)
 Reads the function handle data of the function handle in matvar.
int ReadNextStructField (mat_t *mat, matvar_t *matvar)
 Reads the next struct field of the structure in matvar.
int ReadSingleData (mat_t *mat, float *data, int data_type, int len)
 Reads data of type data_type into a float type.
int ReadUInt16Data (mat_t *mat, mat_uint16_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 16-bit integer type.
int ReadUInt32Data (mat_t *mat, mat_uint32_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 32-bit integer type.
int ReadUInt64Data (mat_t *mat, mat_uint64_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 64-bit integer type.
int ReadUInt8Data (mat_t *mat, mat_uint8_t *data, int data_type, int len)
 Reads data of type data_type into an unsigned 8-bit integer type.
int Write5 (mat_t *mat, matvar_t *matvar, int compress)
 Writes a matlab variable to a version 5 matlab file.
int WriteCellArrayField (mat_t *mat, matvar_t *matvar)
 Writes the header and data for an element of a cell array.
int WriteCellArrayFieldInfo (mat_t *mat, matvar_t *matvar)
 Writes the header and blank data for a cell array.
int WriteCharData (mat_t *mat, void *data, int N, int data_type)
 Writes data as character data.
int WriteCharDataSlab2 (mat_t *mat, void *data, int data_type, int *dims, int *start, int *stride, int *edge)
size_t WriteCompressedCellArrayField (mat_t *mat, matvar_t *matvar, z_stream *z)
 Writes the header and data for a field of a compressed cell array.
size_t WriteCompressedCharData (mat_t *mat, z_stream *z, void *data, int N, int data_type)
 Writes data as compressed character data.
size_t WriteCompressedStructField (mat_t *mat, matvar_t *matvar, z_stream *z)
 Writes the header and data for a field of a compressed struct array.
int WriteDataSlab2 (mat_t *mat, void *data, int data_type, int *dims, int *start, int *stride, int *edge)
int WriteEmptyCharData (mat_t *mat, int N, int data_type)
 Writes empty characters to the MAT file.
void WriteInfo5 (mat_t *mat, matvar_t *matvar)
 Writes the variable information and empty data.
int WriteStructField (mat_t *mat, matvar_t *matvar)
 Writes the header and data for a field of a struct array.

Function Documentation

int InflateArrayFlags ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least 16 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the 16-byte array flags tag and data
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().

int InflateData ( mat_t mat,
z_stream *  z,
void *  buf,
int  nBytes 
)

buf must hold at least nBytes bytes

Parameters:
matPointer to the MAT file
zzlib compression stream
bufPointer to store the data type
nBytesNumber of bytes to inflate
Returns:
Number of bytes read from the file

References mat_t::fp.

Referenced by ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().

int InflateDataTag ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least 8 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the data tag
Returns:
Number of bytes read from the file

References mat_t::fp, matvar_t::name, and matvar_t::z.

int InflateDataType ( mat_t mat,
z_stream *  z,
void *  buf 
)

buf must hold at least 4 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the data type
Returns:
Number of bytes read from the file

References mat_t::fp.

Referenced by Mat_VarReadDataLinear(), Read5(), and ReadData5().

int InflateDimensions ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least (8+4*rank) bytes where rank is the number of dimensions. If the end of the dimensions data is not aligned on an 8-byte boundary, this function eats up those bytes and stores then in buf.

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the dimensions flag and data
Returns:
Number of bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_int32Swap(), MAT_T_INT32, and matvar_t::z.

Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().

int InflateFieldNameLength ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least 8 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the fieldname length
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by ReadNextStructField().

int InflateFieldNames ( mat_t mat,
matvar_t matvar,
void *  buf,
int  nfields,
int  fieldname_length,
int  padding 
)

buf must hold at least nfields * fieldname_length bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the fieldnames
nfieldsNumber of fields
fieldname_lengthMaximum length in bytes of each field
paddingNumber of padding bytes
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by ReadNextStructField().

int InflateFieldNamesTag ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least 8 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the fieldname tag
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by ReadNextStructField().

int InflateSkip ( mat_t mat,
z_stream *  z,
int  nbytes 
)
Parameters:
matPointer to the MAT file
zzlib compression stream
nbytesNumber of uncompressed bytes to skip
Returns:
Number of bytes read from the file

References mat_t::fp.

Referenced by InflateSkipData(), Mat_VarReadDataLinear(), Read5(), ReadData5(), ReadNextCell(), and ReadNextStructField().

int InflateSkip2 ( mat_t mat,
matvar_t matvar,
int  nbytes 
)
Parameters:
matPointer to the MAT file
zzlib compression stream
nbytesNumber of uncompressed bytes to skip
Returns:
Number of bytes read from the file

References mat_t::fp, matvar_t::name, and matvar_t::z.

int InflateSkipData ( mat_t mat,
z_stream *  z,
int  data_type,
int  len 
)
Parameters:
matPointer to the MAT file
zzlib compression stream
data_typeData type (matio_types enumerations)
lenNumber of elements of datatype data_type to skip
Returns:
Number of bytes read from the file

References InflateSkip(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, and MAT_T_UINT8.

Referenced by Mat_VarReadDataLinear(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int InflateVarName ( mat_t mat,
matvar_t matvar,
void *  buf,
int  N 
)
Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the variables name
NNumber of characters in the name
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by Mat_VarReadNextInfo5().

int InflateVarNameTag ( mat_t mat,
matvar_t matvar,
void *  buf 
)
Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the variables name tag
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().

int InflateVarTag ( mat_t mat,
matvar_t matvar,
void *  buf 
)

buf must hold at least 8 bytes

Parameters:
matPointer to the MAT file
matvarPointer to the MAT variable
bufPointer to store the 8-byte variable tag
Returns:
Number of bytes read from the file

References mat_t::fp, and matvar_t::z.

Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().

double Mat_doubleSwap ( double *  a)
float Mat_floatSwap ( float *  a)
mat_int16_t Mat_int16Swap ( mat_int16_t *  a)
mat_int32_t Mat_int32Swap ( mat_int32_t *  a)
mat_int64_t Mat_int64Swap ( mat_int64_t *  a)
Parameters:
apointer to integer to swap
Returns:
the swapped integer

References swap.

Referenced by ReadCompressedInt64Data(), ReadCompressedUInt64Data(), ReadInt64Data(), and ReadUInt64Data().

mat_uint16_t Mat_uint16Swap ( mat_uint16_t *  a)
mat_uint32_t Mat_uint32Swap ( mat_uint32_t *  a)
mat_uint64_t Mat_uint64Swap ( mat_uint64_t *  a)
Parameters:
apointer to integer to swap
Returns:
the swapped integer

References swap.

Referenced by ReadCompressedInt64Data(), ReadCompressedUInt64Data(), ReadInt64Data(), and ReadUInt64Data().

void Mat_VarPrint5 ( matvar_t matvar,
int  printdata 
)
matvar_t* Mat_VarReadNextInfo5 ( mat_t mat)
void Read5 ( mat_t mat,
matvar_t matvar 
)
int ReadCompressedCharData ( mat_t mat,
z_stream *  z,
char *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as char's in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output char values (len*sizeof(char))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, InflateData(), MAT_T_INT16, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, MAT_T_UTF8, and Mat_uint16Swap().

Referenced by Read5(), and ReadCompressedDataSlab2().

int ReadCompressedDataSlab2 ( mat_t mat,
z_stream *  z,
void *  data,
int  class_type,
int  data_type,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
matMAT file pointer
zzlib compression stream
dataPointer to store the output data
class_typeType of data class (matio_classes enumerations)
data_typeDatatype of the stored data (matio_types enumerations)
dimsDimensions of the data
startIndex to start reading data in each dimension
strideRead every stride elements in each dimension
edgeNumber of elements to read in each dimension
Return values:
Numberof bytes read from the file, or -1 on error

References mat_t::fp, InflateSkipData(), MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().

Referenced by ReadData5().

int ReadCompressedDataSlabN ( mat_t mat,
z_stream *  z,
void *  data,
int  class_type,
int  data_type,
int  rank,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
matMAT file pointer
zzlib compression stream
dataPointer to store the output data
class_typeType of data class (matio_classes enumerations)
data_typeDatatype of the stored data (matio_types enumerations)
rankNumber of dimensions in the data
dimsDimensions of the data
startIndex to start reading data in each dimension
strideRead every stride elements in each dimension
edgeNumber of elements to read in each dimension
Return values:
Numberof bytes read from the file, or -1 on error

References mat_t::fp, InflateSkipData(), MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().

Referenced by ReadData5().

int ReadCompressedDoubleData ( mat_t mat,
z_stream *  z,
double *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as double's in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output double values (len*sizeof(double))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedInt16Data ( mat_t mat,
z_stream *  z,
mat_int16_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as signed 16-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output signed 16-bit integer values (len*sizeof(mat_int16_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedInt32Data ( mat_t mat,
z_stream *  z,
mat_int32_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as signed 32-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output signed 32-bit integer values (len*sizeof(mat_int32_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedInt64Data ( mat_t mat,
z_stream *  z,
mat_int64_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as signed 64-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output signed 64-bit integer values (len*sizeof(mat_int64_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedInt8Data ( mat_t mat,
z_stream *  z,
mat_int8_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as signed 8-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output signed 8-bit integer values (len*sizeof(mat_int8_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedSingleData ( mat_t mat,
z_stream *  z,
float *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as float's in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output float values (len*sizeof(float))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedUInt16Data ( mat_t mat,
z_stream *  z,
mat_uint16_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as unsigned 16-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output n unsigned 16-bit integer values (len*sizeof(mat_uint16_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedUInt32Data ( mat_t mat,
z_stream *  z,
mat_uint32_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as unsigned 32-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output unsigned 32-bit integer values (len*sizeof(mat_uint32_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedUInt64Data ( mat_t mat,
z_stream *  z,
mat_uint64_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as unsigned 64-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output unsigned 64-bit integer values (len*sizeof(mat_uint64_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().

Referenced by ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadCompressedUInt8Data ( mat_t mat,
z_stream *  z,
mat_uint8_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len compressed elements of data type data_type storing them as unsigned 8-bit integers in data.

Parameters:
matMAT file pointer
zPointer to the zlib stream for inflation
dataPointer to store the output 8-bit integer values (len*sizeof(mat_uint8_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().

int ReadData5 ( mat_t mat,
matvar_t matvar,
void *  data,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
matMAT file pointer
matvarpointer to the mat variable
datapointer to store the read data in (must be of size edge[0]*...edge[rank-1]*Mat_SizeOfClass(matvar->class_type))
startindex to start reading data in each dimension
stridewrite data every stride elements in each dimension
edgenumber of elements to read in each dimension
Return values:
0on success

References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, COMPRESSION_NONE, COMPRESSION_ZLIB, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, ComplexSplit::Im, InflateDataType(), InflateSkip(), matvar_t::isComplex, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, matvar_t::rank, ComplexSplit::Re, ReadCompressedDataSlab2(), ReadCompressedDataSlabN(), ReadDataSlab2(), ReadDataSlabN(), and matvar_t::z.

Referenced by Mat_VarReadData().

int ReadDataSlab2 ( mat_t mat,
void *  data,
int  class_type,
int  data_type,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
matMAT file pointer
dataPointer to store the output data
class_typeType of data class (matio_classes enumerations)
data_typeDatatype of the stored data (matio_types enumerations)
dimsDimensions of the data
startIndex to start reading data in each dimension
strideRead every stride elements in each dimension
edgeNumber of elements to read in each dimension
Return values:
Numberof bytes read from the file, or -1 on error

References mat_t::fp, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().

Referenced by ReadData5().

int ReadDataSlabN ( mat_t mat,
void *  data,
int  class_type,
int  data_type,
int  rank,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
matMAT file pointer
dataPointer to store the output data
class_typeType of data class (matio_classes enumerations)
data_typeDatatype of the stored data (matio_types enumerations)
rankNumber of dimensions in the data
dimsDimensions of the data
startIndex to start reading data in each dimension
strideRead every stride elements in each dimension
edgeNumber of elements to read in each dimension
Return values:
Numberof bytes read from the file, or -1 on error

References mat_t::fp, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().

Referenced by ReadData5().

int ReadDoubleData ( mat_t mat,
double *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as double's in data.

Parameters:
matMAT file pointer
dataPointer to store the output double values (len*sizeof(double))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadInt16Data ( mat_t mat,
mat_int16_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as signed 16-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output signed 16-bit integer values (len*sizeof(mat_int16_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadInt32Data ( mat_t mat,
mat_int32_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as signed 32-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output signed 32-bit integer values (len*sizeof(mat_int32_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadInt64Data ( mat_t mat,
mat_int64_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as signed 64-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output signed 64-bit integer values (len*sizeof(mat_int64_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadInt8Data ( mat_t mat,
mat_int8_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as signed 8-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output signed 8-bit integer values (len*sizeof(mat_int8_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadNextCell ( mat_t mat,
matvar_t matvar 
)
int ReadNextFunctionHandle ( mat_t mat,
matvar_t matvar 
)
Parameters:
matMAT file pointer
matvarMAT variable pointer
Returns:
Number of bytes read

References matvar_t::data, matvar_t::data_size, matvar_t::dims, Mat_VarReadNextInfo(), matvar_t::nbytes, and matvar_t::rank.

Referenced by Mat_VarReadNextInfo5().

int ReadNextStructField ( mat_t mat,
matvar_t matvar 
)
int ReadSingleData ( mat_t mat,
float *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as float's in data.

Parameters:
matMAT file pointer
dataPointer to store the output float values (len*sizeof(float))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadUInt16Data ( mat_t mat,
mat_uint16_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as unsigned 16-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output unsigned 16-bit integer values (len*sizeof(mat_uint16_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadUInt32Data ( mat_t mat,
mat_uint32_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as unsigned 32-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output unsigned 32-bit integer values (len*sizeof(mat_uint32_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().

int ReadUInt64Data ( mat_t mat,
mat_uint64_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as unsigned 64-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output unsigned 64-bit integer values (len*sizeof(mat_uint64_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().

Referenced by ReadDataSlab2(), and ReadDataSlabN().

int ReadUInt8Data ( mat_t mat,
mat_uint8_t *  data,
int  data_type,
int  len 
)

Reads from the MAT file len elements of data type data_type storing them as unsigned 8-bit integers in data.

Parameters:
matMAT file pointer
dataPointer to store the output unsigned 8-bit integer values (len*sizeof(mat_uint8_t))
data_typeone of the matio_types enumerations which is the source data type in the file
lenNumber of elements of type data_type to read from the file
Return values:
Numberof bytes read from the file

References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().

Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().

int Write5 ( mat_t mat,
matvar_t matvar,
int  compress 
)
int WriteCellArrayField ( mat_t mat,
matvar_t matvar 
)
int WriteCellArrayFieldInfo ( mat_t mat,
matvar_t matvar 
)
int WriteCharData ( mat_t mat,
void *  data,
int  N,
int  data_type 
)

This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.

  • Matlab character data cannot be unsigned 8-bit integers, it needs at least unsigned 16-bit integers
Parameters:
matMAT file pointer
datacharacter data to write
NNumber of elements to write
data_typecharacter data type (enum matio_types)
Returns:
number of bytes written

References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.

Referenced by Write5(), WriteCellArrayField(), and WriteStructField().

int WriteCharDataSlab2 ( mat_t mat,
void *  data,
int  data_type,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
Writesa 2-D slab of character data to the MAT file

This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.

  • Matlab character data cannot be unsigned 8-bit integers, it needs at least unsigned 16-bit integers

should return the number of bytes written, but currently returns 0

Parameters:
matMAT file pointer
datapointer to the slab of data
data_typedata type of the data (enum matio_types)
dimsdimensions of the dataset
startindex to start writing the data in each dimension
stridewrite data every stride elements
edgenumber of elements to write in each dimension
Returns:
number of byteswritten

References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.

Referenced by Mat_VarWriteData().

size_t WriteCompressedCellArrayField ( mat_t mat,
matvar_t matvar,
z_stream *  z 
)
size_t WriteCompressedCharData ( mat_t mat,
z_stream *  z,
void *  data,
int  N,
int  data_type 
)

This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.

  • Matlab character data cannot be unsigned 8-bit integers, it needs at least unsigned 16-bit integers
Parameters:
matMAT file pointer
zpointer to the zlib compression stream
datacharacter data to write
NNumber of elements to write
data_typecharacter data type (enum matio_types)
Returns:
number of bytes written

References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.

Referenced by Write5(), WriteCompressedCellArrayField(), and WriteCompressedStructField().

size_t WriteCompressedStructField ( mat_t mat,
matvar_t matvar,
z_stream *  z 
)
int WriteDataSlab2 ( mat_t mat,
void *  data,
int  data_type,
int *  dims,
int *  start,
int *  stride,
int *  edge 
)
Parameters:
Writesa 2-D slab of data to the MAT file

should return the number of bytes written, but currently returns 0

Parameters:
matMAT file pointer
datapointer to the slab of data
data_typedata type of the data (enum matio_types)
dimsdimensions of the dataset
startindex to start writing the data in each dimension
stridewrite data every stride elements
edgenumber of elements to write in each dimension
Returns:
number of byteswritten

References mat_t::fp, MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, and MAT_T_UINT8.

Referenced by Mat_VarWriteData().

int WriteEmptyCharData ( mat_t mat,
int  N,
int  data_type 
)

This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.

  • Matlab character data cannot be unsigned 8-bit integers, it needs at least unsigned 16-bit integers
Parameters:
matMAT file pointer
datacharacter data to write
NNumber of elements to write
data_typecharacter data type (enum matio_types)
Returns:
number of bytes written

References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.

Referenced by WriteCellArrayFieldInfo(), and WriteInfo5().

void WriteInfo5 ( mat_t mat,
matvar_t matvar 
)
int WriteStructField ( mat_t mat,
matvar_t matvar 
)