matlab mxgetnumberoffields函数语法

发表matlab mxgetnumberoffields函数相关文章
一句话说明: Number of fields in structure array

mxGetNumberOfFields (C and Fortran)

Number of fields in structure array

C Syntax

#include "matrix.h"
int mxGetNumberOfFields(const mxArray *pm);

Fortran Syntax

integer*4 mxGetNumberOfFields(pm)
mwPointer pm

Arguments

pm

Pointer to a structure mxArray

Returns

Number of fields, on success. Returns 0 on failure. The most common cause of failure is that pm is not a structure mxArray. Call mxIsStruct to determine whether pm is a structure.

Description

Call mxGetNumberOfFields to determine how many fields are in the specified structure mxArray.

Once you know the number of fields in a structure, you can loop through every field in order to set or to get field values.

Examples

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

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

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

See Also

mxGetField, mxIsStruct, mxSetField

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

与matlab mxgetnumberoffields用法相关的文章

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