====== MAT (Matlab MAT file with data field) ====== ===== Motivation ===== The file formats that support reading channel recordings ([[xff - ACQ format|ACQ]] and [[xff - NTT format|NTT]]) cannot be saved back to disk. It was a choice of convenience to create a (more or less) compatible format that can be easily saved (and also is available later without the toolbox). ===== General setup ===== Whereas most binary formats come with a specific field-by-field description, MAT files are simply loaded and stored in a [[xff]] object, with the main addition that for files not prior created with the toolbox, the largest numeric variable will be assigned to the ''.Data'' field and all other variables are stored in the ''.Info'' sub-struct. ===== Example ===== If a MAT file on disk has the following variables: * ''channels: 1531891x6 double'' * ''channelnames: 1x6 cell'' * ''channelinfo: 1x6 struct'' Reading this file as an xff object will make the data available as: * ''.Data'' - this will be the ''channels'' variable * ''.Info'' - this will be a 1x1 struct with fields ''.channelnames'' and ''.channelinfo''; additionally there will be a ''.DataFieldName'' field in the ''.Info'' property giving the variable name in the MAT-file which ''.Data'' represents Upon saving this object, the ''.Data'' property will, again, be stored in a variable with the name of ''.DataFieldName'' (and the ''.DataFieldName'' will be added to the MAT file so as not having to re-detect the data field).