23.07.2012 Views

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

SHOW MORE
SHOW LESS

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

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

13<br />

An array (a matrix is a special case) has two sizes: the number of its dimensions<br />

(for matrices, always two) and the actual size of each dimension. You can use<br />

these Size() functions to determine both the number of dimensions and the<br />

size of each dimension.<br />

int32 Size() const<br />

Return the number of dimensions. In this version of the library, this function<br />

always returns two.<br />

int32 Size(int32 dim) const<br />

Return the size (number of elements) of the indicated dimension. The integer<br />

argument to this function must be either 1 or 2.<br />

int32 Size(int32* dims, int maxdims=2) const<br />

Determine the sizes of all the dimensions of the array and return them via the<br />

given integer array, dims. maxdims is the maximum number of dimensions the<br />

function should return. The input integer array dims must contain enough<br />

space to store at least maxdims integers. If maxdims is less than the number of<br />

dimensions of the mwArray, the last dimension returned is the product of the<br />

remaining dimensions. This function’s return value is the number of<br />

dimensions of the mwArray.

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

Saved successfully!

Ooh no, something went wrong!