User`s manual
MATLAB Data
1-7
its dimensions are
size(a)
ans =
3 5
and its data is stored as
Data Types in MATLAB
Complex Double-Precision Matrices
The most common data type in MATLAB is the complex double-precision,
nonsparse matrix. These matrices are of type
double and have dimensions
m-by-n, where m is the number of rows and n is the number of columns. The data
is stored as two vectors of double-precision numbers – one contains the real
data and one contains the imaginary data. The pointers to this data are
referred to as
pr (pointer to real data) and pi (pointer to imaginary data),
respectively. A real-only, double-precision matrix is one whose
pi is NULL.
Numeric Matrices
MATLAB also supports other types of numeric matrices. These are
single-precision floating-point and 8-, 16-, and 32-bit integers, both signed and
unsigned. The data is stored in two vectors in the same manner as
double-precision matrices.
MATLAB Strings
MATLAB strings are of type char and are stored the same way as unsigned
16-bit integers except there is no imaginary data component. Each character in
the string is stored as 16-bit ASCII Unicode. Unlike C, MATLAB strings are
not null terminated.
Sparse Matrices
Sparse matrices have a different storage convention than full matrices in
MATLAB. The parameters
pr and pi are still arrays of double-precision
numbers, but there are three additional parameters,
nzmax, ir, and jc:
h f p o l o u o r s o c e r h