13.07.2015 Views

MAT-File Format - SERC

MAT-File Format - SERC

MAT-File Format - SERC

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Level 5 <strong>MAT</strong>LAB Array Data Element <strong>Format</strong>sCompressed Data Element. Figure 1-8 shows how the three-dimensional numericarray in this example, arr, is represented in a <strong>MAT</strong>-file when compression isused to conserve storage space.A = [ 1 2 3 ; 4 5 6 ];B = [ 7 8 9 ; 10 11 12];arr = cat(3,A,B)arr(:,:,1) =1 2 34 5 6arr(:,:,2) =7 8 910 11 12In the figure, note:• The Array Name subelement uses the compressed data element format.• The numeric data in the array, stored in double precision format in<strong>MAT</strong>LAB, is stored as 8-bit, unsigned values in the pr subelement. The Classfield in the Array Flags subelement identifies the original <strong>MAT</strong>LAB datatype.Figure 1-8: Example Numeric Array <strong>MAT</strong>-file Data Element (Compressed)Bytes 1 2 3 45 6 7 8Tagmi<strong>MAT</strong>RIX7272 bytesUndefined3miUINT32miINT3222miUINT80miINT8mxDOUBLE_CLASSU n d e f i n e dPaddinga r r1 4 2 5 3 6 7 108 11 9 12 Padding812312PaddingArrayFlagsDimensionsArrayArrayNamepr1-21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!