External Interfaces Reference Previous page   Next Page
mxGetElementSize

Get number of bytes required to store each data element

Fortran Syntax

Arguments

pm
   Pointer to an mxArray.

Returns

The number of bytes required to store one element of the specified mxArray, if successful. Returns 0 on failure. The primary reason for failure is that pm points to an mxArray having an unrecognized class. If pm points to a cell mxArray or a structure mxArray, then mxGetElementSize returns the size of a pointer (not the size of all the elements in each cell or structure field).

Description

Call mxGetElementSize to determine the number of bytes in each data element of the mxArray. For example, if the class of an mxArray is int16, then the mxArray stores each data element as a 16-bit (2 byte) signed integer. Thus, mxGetElementSize returns 2.

See Also

mxGetM, mxGetN


Previous page  mxGetDimensions mxGetEps Next page

© 1994-2005 The MathWorks, Inc.