MAT-File Format - SERC
MAT-File Format - SERC MAT-File Format - SERC
1 MAT-File Formatsee “Numeric Array and Character Array Data Element Formats” onpage 1-15.Figure 1-12: Example Cell Array Data ElementBytes 1 2 3 4 5 6 7 8TagmiMATRIX168UndefinedmiUINT32 8miINT320mxCELL_CLASS1 2U n d e f i n e d8ArrayFlagsDimensionsArray1miINT8CPaddingArray NamemiMATRIX56miUINT32 8168 bytesUndefined1miINT320mxDOUBLE_CLASS2 3miINT8miUINT8 6AU n d e f i n e d8PaddingNumeric array1 4 2 5 3 6 PaddingmiMATRIX56CellsmiUINT32 8Undefined1miINT320mxDOUBLE_CLASS2 3miINT8BU n d e f i n e d8PaddingNumeric arraymiUINT8 67 10 8 11 9 12 Padding1-28
Level 5 MATLAB Array Data Element FormatsStructure MAT-File Data Element FormatA MAT-file data element representing a MATLAB structure is composed of sixsubelements. Table 1-6 lists the subelements in the order in which they appearin the data element. The table lists the values of the Data Type and Number ofBytes fields of the tag for each subelement.Table 1-6: Structure Subelements with Tag DataSubelements Data Type Number of BytesArray Flags miUINT32 2*size-of-Data-Type (8 bytes)Dimensions Array miINT32 number-of-dimensions*size-of-Data-TypeArray Name miINT8 number-of-characters*size-of-Data-TypeField Name Length miINT32 size-of-Data-Type (4 bytes)Field Names miINT8 number-of-fields*Field-Name-LengthFieldsEach field is written in place as an array. Fields are written incolumn order.Array Flags SubelementThis subelement identifies the MATLAB array type (class) represented by thedata element and provides other information about the array. Figure 1-13shows the Array Flags format. The Array Flags subelement is common to allarray types.Figure 1-13: Array Flags FormatBytes 1 2 3 4 5 6 7 8Undefined Flags Class U n d e f i n e dFlags. See “Flags” on page 1-16 for more information.Class. This field contains a value that identifies the MATLAB data typerepresented by the data element. For structures, Class contains the value 2(mxSTRUCT_CLASS). For more information, see “Class” on page 1-16.1-29
- Page 1 and 2: MATLAB®The Language of Technical C
- Page 3: Revision History:June 1999 Online o
- Page 6 and 7: 1 MAT-File FormatIntroductionThis d
- Page 8 and 9: 1 MAT-File FormatLevel 5 MAT-File F
- Page 10 and 11: 1 MAT-File FormatMAT-File Header Fo
- Page 12 and 13: 1 MAT-File FormatData Element Forma
- Page 14 and 15: 1 MAT-File FormatFor character data
- Page 17 and 18: Level 5 MAT-File FormatEach variabl
- Page 19 and 20: Level 5 MATLAB Array Data Element F
- Page 21 and 22: Level 5 MATLAB Array Data Element F
- Page 23 and 24: Level 5 MATLAB Array Data Element F
- Page 25 and 26: Level 5 MATLAB Array Data Element F
- Page 27 and 28: Level 5 MATLAB Array Data Element F
- Page 29: Level 5 MATLAB Array Data Element F
- Page 34 and 35: 1 MAT-File FormatDimensions Array S
- Page 36 and 37: 1 MAT-File FormatFigure 1-14: Examp
- Page 38 and 39: 1 MAT-File FormatClass. This field
- Page 40 and 41: 1 MAT-File FormatLevel 4 MAT-File F
- Page 42 and 43: 1 MAT-File FormatTable 1-8: Level 4
- Page 44 and 45: 1 MAT-File FormatAgain, we strongly
- Page 46 and 47: IndexHheaderdefined 1-4flag fields
- Page 48: IndexIndex-4
Level 5 <strong>MAT</strong>LAB Array Data Element <strong>Format</strong>sStructure <strong>MAT</strong>-<strong>File</strong> Data Element <strong>Format</strong>A <strong>MAT</strong>-file data element representing a <strong>MAT</strong>LAB structure is composed of sixsubelements. Table 1-6 lists the subelements in the order in which they appearin the data element. The table lists the values of the Data Type and Number ofBytes fields of the tag for each subelement.Table 1-6: Structure Subelements with Tag DataSubelements Data Type Number of BytesArray Flags miUINT32 2*size-of-Data-Type (8 bytes)Dimensions Array miINT32 number-of-dimensions*size-of-Data-TypeArray Name miINT8 number-of-characters*size-of-Data-TypeField Name Length miINT32 size-of-Data-Type (4 bytes)Field Names miINT8 number-of-fields*Field-Name-LengthFieldsEach field is written in place as an array. Fields are written incolumn order.Array Flags SubelementThis subelement identifies the <strong>MAT</strong>LAB array type (class) represented by thedata element and provides other information about the array. Figure 1-13shows the Array Flags format. The Array Flags subelement is common to allarray types.Figure 1-13: Array Flags <strong>Format</strong>Bytes 1 2 3 4 5 6 7 8Undefined Flags Class U n d e f i n e dFlags. See “Flags” on page 1-16 for more information.Class. This field contains a value that identifies the <strong>MAT</strong>LAB data typerepresented by the data element. For structures, Class contains the value 2(mxSTRUCT_CLASS). For more information, see “Class” on page 1-16.1-29