13.07.2015 Views

MAT-File Format - SERC

MAT-File Format - SERC

MAT-File Format - SERC

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 <strong>MAT</strong>-<strong>File</strong> <strong>Format</strong>Real Part (pr) SubelementThis subelement contains the numeric data in the <strong>MAT</strong>LAB array. If the arraycontains complex numbers (the complex bit in the Array Flags is set), this isthe real part of the number.Because <strong>MAT</strong>LAB uses data compression to save storage space, the data typeof the values can be any of the numeric data types listed in Table 1-1, <strong>MAT</strong>-<strong>File</strong>Data Types, on page 1-9. For more information, see “Automatic Compression ofNumeric Data” on page 1-19.Imaginary Part (pi) SubelementThis subelement contains the imaginary data in the array, if one or more of thenumeric values in the <strong>MAT</strong>LAB array is a complex number (if the complex bitis set in Array Flags).Because <strong>MAT</strong>LAB uses data compression to save storage space, the data typeof the values can be any of the numeric data types listed in Table 1-1, <strong>MAT</strong>-<strong>File</strong>Data Types, on page 1-9. For more information, see “Automatic Compression ofNumeric Data” on page 1-19.Note You must check the value of the Data Type field in the tag of Real Partand Imaginary Part subelements to identify the type of the data. Also notethat <strong>MAT</strong>LAB reads and writes these values in column-major order.Example Sparse ArrayFigure 1-10 illustrates the <strong>MAT</strong>-file data element format of this 3-by-3 sparsematrix:a = [ 1 2 3 ];S = sparse(a,a,a+.5)S =(1,1) 1.5000(2,2) 2.5000(3,3) 3.50001-24

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

Saved successfully!

Ooh no, something went wrong!