/* * Matlab binary data file header format: * * type is of the form MOPT * * M = 0 for IEEE Little Endian (PC), 1 for IEEE Big Endian (Sparc) * 2 for VAX D-float, 3 for VAX G-float, 4 for Cray. * * O = 0, reserved for future use, according to the manual. * But, if set to 1, appears to specify row-wise order. * * P = 0 for double, 1 for float, 2 for long, 3 for short, * 4 for unsigned short, 5 for unsigned char * * T = 0 for matrix, 1 for text, 2 for sparse matrix * * Following the header is the matrix name, the real part (column-wise), * then the imaginary part, if any. */ typedef struct { long type; /* type */ long rows; /* row dimension */ long cols; /* column dimension */ long imag; /* flag for imaginary part */ long namelen; /* name length, including NULL */ } Matlab_header;