MBFread¶
- MBFread(filename)¶
MBFREAD Read a file in Multivariable Binary Format (MBF)
- Usage:
header = MBFread(filename) [header, variables] = MBFread(filename)
- Inputs:
filename : char - path to .mbf file – required
- Outputs:
header : struct with fields file_info, var_names, var_dims, var_types variables : 1xV cell - loaded variables in file order (only returned when requested)
Notes
The MBF file layout is:
- Header (ASCII, line-based)
Line 1 : file info (filename by default) Line 2 : blank Line 3 : number of variables Line 4 : blank Per variable (4 lines):
name : variable name (e.g. ‘My_Var’) dimensions : ‘AxBxC…’ (e.g. ‘1x3’, ‘12x4x234’) type : ‘single’, ‘double’, ‘uint16’, ‘char’, … blank
- Data section (IEEE little-endian binary)
Each variable is written in its declared type. Types followed by a bracketed physical range (e.g. ‘int16 [-3000 3000]’) are stored as integer indices and are automatically rescaled on read. Non-native types (table, struct, cell, …) are written as serialized uint8 byte streams.
See also: MBFwrite, intrange2num, num2intrange
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿