| MATLAB® | ![]() |
#include "matrix.h" size_t mxGetM(const mxArray *pm);
mwPointer mxGetM(pm) mwPointer pm
Pointer to an mxArray
The number of rows in the mxArray to which pm points.
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, mxGetM returns 8.
Note Fortran does not have an equivalent of size_t. mwPointer is a preprocessor macro that provides the appropriate Fortran type. The value returned by this function, however, is not a pointer. |
See convec.c in the refbook subdirectory of the examples directory.
Additional examples:
fulltosparse.c, revord.c, timestwo.c, and xtimesy.c in the refbook subdirectory of the examples directory
explore.c, mexget.c, mexlock.c, mexsettrapflag.c and yprime.c in the mex subdirectory of the examples directory
mxmalloc.c, mxsetdimensions.c, mxgetnzmax.c, and mxsetnzmax.c in the mx subdirectory of the examples directory
See matdemo2.F in the eng_mat subdirectory of the examples directory for a sample program that illustrates how to use this routine in a Fortran program.
![]() | mxGetLogicals (C) | mxGetN (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |