MATLAB Application Program Interface Reference Help Desk

mxGetNumberOfElements

Purpose

Get number of elements in an array

C Syntax

Arguments

array_ptr

Pointer to an mxArray.

Returns

Number of elements in the specified mxArray.

Description

mxGetNumberOfElements tells you how many "pieces" an array has. Use mxGetClassID to find out what the pieces are. These two functions provide the highest-level information about an array.

Example

See mxGetNumberOfElements.c in the mx subdirectory of the examples directory.

See Also

mxGetDimensions, mxGetM, mxGetN, mxGetClassID, mxGetClassName



[ Previous | Help Desk | Next ]