MatHeader

MatHeader

MAT-files are a binary format directly supported by SigPlot. A MAT-file consists of a 132-byte header followed by binary data. For more information on MAT-files, please visit https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf

Offset Name Size Type Description
0 header 115 char[115] Header
116 subsys 7 char[7]
124 version 2 int_2
126 endianness 2 char[2]
128 data_offset 4 int_4
132 byte_offset 4 int_4

Constructor

new MatHeader(buf)

Create matfile header and attach data buffer

Source:
Parameters:
Name Type Description
buf array

Data bffer

Classes

MatHeader

Members

firstDataTypeOffsetBegin

WARNING: type "miCOMPRESSED" is the default for MATLAB files above version 6. These compressed files are currently UNREADABLE by this program as the file must be decompressed before reading.

Source:

versionOffsetBegin

Version field

Source:

Methods

(private) createArray(buf, offset, length, type)

Get a JS array from MATLAB array

Source:
Parameters:
Name Type Description
buf ArrayBuffer | Array
offset number
length number
type string

getDataWithType(dv, typeName, offset, littleEndian) → {*}

Source:
Parameters:
Name Type Description
dv
typeName
offset
littleEndian
Returns:
Type:
*

setData(buf, dvhdr, currIndex, littleEndian)

Source:
Parameters:
Name Type Description
buf
dvhdr
currIndex
littleEndian