Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

mxGetNumberOfDimensions (C and Fortran) - Get number of dimensions in mxArray

C Syntax

#include "matrix.h"
mwSize mxGetNumberOfDimensions(const mxArray *pm);

Fortran Syntax

mwSize mxGetNumberOfDimensions(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Number of dimensions in the specified mxArray. The returned value is always 2 or greater.

Description

Use mxGetNumberOfDimensions to determine how many dimensions are in the specified array. To determine how many elements are in each dimension, call mxGetDimensions.

C Examples

See explore.c in the matlabroot/extern/examples/mex folder .

Additional examples:

See Also

mxSetM, mxSetN, mxGetDimensions

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS