matlab mxgetdimensions函数语法

发表matlab mxgetdimensions函数相关文章
一句话说明: Pointer to dimensions array

mxGetDimensions (C and Fortran)

Pointer to dimensions array

C Syntax

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

Fortran Syntax

mwPointer mxGetDimensions(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray.

Returns

Pointer to 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.

Description

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))

Examples

See the following examples in matlabroot/extern/examples/mx.

See the following examples in matlabroot/extern/examples/refbook.

See the following examples in matlabroot/extern/examples/mex.

See Also

mxGetNumberOfDimensions

欢迎转载,转载请注明来自一手册:http://yishouce.com/matlab/func/mxgetdimensions

与matlab mxgetdimensions用法相关的文章

友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1