| MATLAB® | ![]() |
#include "matrix.h" const mwSize *mxGetDimensions(const mxArray *pm);
mwPointer mxGetDimensions(pm) mwPointer pm
Pointer to an mxArray.
The address of the first element in the dimensions array. Each integer in the dimensions array represents the number of elements in a particular dimension. The array is not NULL terminated.
Use mxGetDimensions to determine how many elements are in each dimension of the mxArray that pm points to. Call mxGetNumberOfDimensions to get the number of dimensions in the mxArray.
To copy the values to Fortran, use mxCopyPtrToInteger4 in the following manner:
C Get dimensions of mxArray, pm
mxCopyPtrToInteger4(mxGetDimensions(pm), dims,
+ mxGetNumberOfDimensions(pm))See mxcalcsinglesubscript.c in the mx subdirectory of the examples directory.
Additional examples:
findnz.c and phonebook.c in the refbook subdirectory of the examples directory
explore.c in the mex subdirectory of the examples directory
mxgeteps.c and mxisfinite.c in the mx subdirectory of the examples directory
![]() | mxGetData (C and Fortran) | mxGetElementSize (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |