Data Structures | Typedefs | Enumerations | Functions

matio.h File Reference

Data Structures

struct  ComplexSplit
 Complex data type using split storage. More...
struct  mat_t
 Matlab MAT File information. More...
struct  matvar_t
 Matlab variable information. More...
struct  sparse_t
 sparse data information More...

Typedefs

typedef _mat_int16_t mat_int16_t
typedef _mat_int32_t mat_int32_t
typedef _mat_int64_t mat_int64_t
typedef _mat_int8_t mat_int8_t
typedef struct mat_t mat_t
 Matlab MAT File information.
typedef _mat_uint16_t mat_uint16_t
typedef _mat_uint32_t mat_uint32_t
typedef _mat_uint64_t mat_uint64_t
typedef _mat_uint8_t mat_uint8_t
typedef struct matvar_t matvar_t
 Matlab variable information.
typedef struct sparse_t sparse_t
 sparse data information

Enumerations

enum  { BY_NAME = 1, BY_INDEX = 2 }
enum  mat_acc { MAT_ACC_RDONLY = 1, MAT_ACC_RDWR = 2 }
 

MAT file access types.

More...
enum  mat_ft { MAT_FT_MAT5 = 1, MAT_FT_MAT4 = 1 << 16 }
 

MAT file versions.

More...
enum  matio_classes {
  MAT_C_CELL = 1, MAT_C_STRUCT = 2, MAT_C_OBJECT = 3, MAT_C_CHAR = 4,
  MAT_C_SPARSE = 5, MAT_C_DOUBLE = 6, MAT_C_SINGLE = 7, MAT_C_INT8 = 8,
  MAT_C_UINT8 = 9, MAT_C_INT16 = 10, MAT_C_UINT16 = 11, MAT_C_INT32 = 12,
  MAT_C_UINT32 = 13, MAT_C_INT64 = 14, MAT_C_UINT64 = 15, MAT_C_FUNCTION = 16
}
 

Matlab variable classes.

More...
enum  matio_compression { COMPRESSION_NONE = 0, COMPRESSION_ZLIB = 1 }
 

Matlab compression options.

More...
enum  matio_flags { MAT_F_COMPLEX = 0x0800, MAT_F_GLOBAL = 0x0400, MAT_F_LOGICAL = 0x0200, MAT_F_CLASS_T = 0x00ff }
 

Matlab array flags.

More...
enum  matio_types {
  MAT_T_UNKNOWN = 0, MAT_T_INT8 = 1, MAT_T_UINT8 = 2, MAT_T_INT16 = 3,
  MAT_T_UINT16 = 4, MAT_T_INT32 = 5, MAT_T_UINT32 = 6, MAT_T_SINGLE = 7,
  MAT_T_DOUBLE = 9, MAT_T_INT64 = 12, MAT_T_UINT64 = 13, MAT_T_MATRIX = 14,
  MAT_T_COMPRESSED = 15, MAT_T_UTF8 = 16, MAT_T_UTF16 = 17, MAT_T_UTF32 = 18,
  MAT_T_STRING = 20, MAT_T_CELL = 21, MAT_T_STRUCT = 22, MAT_T_ARRAY = 23,
  MAT_T_FUNCTION = 24
}
 

Matlab data types.

More...

Functions

EXTERN int Mat_CalcSingleSubscript (int rank, int *dims, int *subs)
 Calculate a single subscript from a set of subscript values.
EXTERN int * Mat_CalcSubscripts (int rank, int *dims, int index)
 Calculate a set of subscript values from a single(linear) subscript.
EXTERN int Mat_Close (mat_t *mat)
 Closes an open Matlab MAT file.
EXTERN mat_tMat_Create (const char *matname, const char *hdr_str)
 Creates a new Matlab MAT file.
EXTERN void Mat_Critical (const char *format,...)
EXTERN int Mat_DebugMessage (int level, const char *format,...)
EXTERN void Mat_Error (const char *format,...)
EXTERN void Mat_Help (const char *helpstr[])
EXTERN int Mat_LogClose (void)
EXTERN int Mat_LogInit (char *progname)
EXTERN int Mat_LogInitFunc (char *prog_name, void(*log_func)(int log_level, char *message))
EXTERN int Mat_Message (const char *format,...)
EXTERN mat_tMat_Open (const char *matname, int mode)
 Opens an existing Matlab MAT file.
EXTERN int Mat_Rewind (mat_t *mat)
 Rewinds a Matlab MAT file to the first variable.
EXTERN int Mat_SetDebug (int d)
EXTERN int Mat_SetVerbose (int verb, int s)
EXTERN size_t Mat_SizeOf (int data_type)
EXTERN size_t Mat_SizeOfClass (int class_type)
 Returns the size of a Matlab Class.
EXTERN int Mat_VarAddStructField (matvar_t *matvar, matvar_t **fields)
 Adds a field to a structure.
EXTERN matvar_tMat_VarCalloc (void)
 Allocates memory for a new matvar_t and initializes all the fields.
EXTERN matvar_tMat_VarCreate (const char *name, int class_type, int data_type, int rank, int *dims, void *data, int opt)
 Creates a MAT Variable with the given name and (optionally) data.
EXTERN int Mat_VarDelete (mat_t *mat, char *name)
 Deletes a variable from a file.
EXTERN matvar_tMat_VarDuplicate (const matvar_t *in, int opt)
 Duplicates a matvar_t structure.
EXTERN void Mat_VarFree (matvar_t *matvar)
 Frees all the allocated memory associated with the structure.
EXTERN matvar_tMat_VarGetCell (matvar_t *matvar, int index)
 Returns a pointer to the Cell array at a specific index.
EXTERN matvar_t ** Mat_VarGetCells (matvar_t *matvar, int *start, int *stride, int *edge)
 Indexes a cell array.
EXTERN matvar_t ** Mat_VarGetCellsLinear (matvar_t *matvar, int start, int stride, int edge)
 Indexes a cell array.
EXTERN int Mat_VarGetNumberOfFields (matvar_t *matvar)
 Returns the number of fields in a structure variable.
EXTERN size_t Mat_VarGetSize (matvar_t *matvar)
 Calculates the size of a matlab variable in bytes.
EXTERN matvar_tMat_VarGetStructField (matvar_t *matvar, void *name_or_index, int opt, int index)
 Finds a field of a structure.
EXTERN matvar_tMat_VarGetStructs (matvar_t *matvar, int *start, int *stride, int *edge, int copy_fields)
 Indexes a structure.
EXTERN matvar_tMat_VarGetStructsLinear (matvar_t *matvar, int start, int stride, int edge, int copy_fields)
 Indexes a structure.
EXTERN void Mat_VarPrint (matvar_t *matvar, int printdata)
 Prints the variable information.
EXTERN matvar_tMat_VarRead (mat_t *mat, char *name)
 Reads the variable with the given name from a MAT file.
EXTERN int Mat_VarReadData (mat_t *mat, matvar_t *matvar, void *data, int *start, int *stride, int *edge)
 Reads MAT variable data from a file.
EXTERN int Mat_VarReadDataAll (mat_t *mat, matvar_t *matvar)
 Reads all the data for a matlab variable.
EXTERN int Mat_VarReadDataLinear (mat_t *mat, matvar_t *matvar, void *data, int start, int stride, int edge)
 Reads MAT variable data from a file.
EXTERN matvar_tMat_VarReadInfo (mat_t *mat, char *name)
 Reads the information of a variable with the given name from a MAT file.
EXTERN matvar_tMat_VarReadNext (mat_t *mat)
 Reads the next variable in a MAT file.
EXTERN matvar_tMat_VarReadNextInfo (mat_t *mat)
 Reads the information of the next variable in a MAT file.
EXTERN int Mat_VarWrite (mat_t *mat, matvar_t *matvar, int compress)
 Writes the given MAT variable to a MAT file.
EXTERN int Mat_VarWriteData (mat_t *mat, matvar_t *matvar, void *data, int *start, int *stride, int *edge)
 Writes the given data to the MAT variable.
EXTERN int Mat_VarWriteInfo (mat_t *mat, matvar_t *matvar)
 Writes the given MAT variable to a MAT file.
EXTERN int Mat_VerbMessage (int level, const char *format,...)
EXTERN void Mat_Warning (const char *format,...)
EXTERN char * strdup_printf (const char *format,...)
EXTERN char * strdup_vprintf (const char *format, va_list ap)

Detailed Description

LIBMATIO Header