Main Content

mxGetM (C)

Number of rows in mxArray

C Syntax

#include "matrix.h"
size_t mxGetM(const mxArray *pm);


mxGetM returns the number of rows in the specified array. The term rows always means the first dimension of the array, no matter how many dimensions the array has. For example, if pm points to a four-dimensional array having dimensions 8-by-9-by-5-by-3, then mxGetM returns 8.

Input Arguments

expand all

Pointer to an mxArray array, specified as const mxArray*.


See these examples in matlabroot/extern/examples/refbook:

See these examples in matlabroot/extern/examples/mx:

See these examples in matlabroot/extern/examples/mex:

Version History

Introduced before R2006a

See Also

| |