matlab mxremovefield函数语法

发表matlab mxremovefield函数相关文章
一句话说明: Remove field from structure array

mxRemoveField (C and Fortran)

Remove field from structure array

C Syntax

#include "matrix.h"
void mxRemoveField(mxArray *pm, int fieldnumber);

Fortran Syntax

subroutine mxRemoveField(pm, fieldnumber)
mwPointer pm
integer*4 fieldnumber

Arguments

pm

Pointer to a structure mxArray

fieldnumber

Number of the field you want to remove. In C, to remove the first field, set fieldnumber to 0; to remove the second field, set fieldnumber to 1; and so on. In Fortran, to remove the first field, set fieldnumber to 1; to remove the second field, set fieldnumber to 2; and so on.

Description

Call mxRemoveField to remove a field from a structure array. If the field does not exist, nothing happens. This function does not destroy the field values. To destroy the actual field values, call mxRemoveField and then call mxDestroyArray.

Consider a MATLAB® structure initialized to:

patient.name = 'John Doe';
patient.billing = 127.00;
patient.test = [79 75 73; 180 178 177.5; 220 210 205];

In C, the field number 0 represents the field name; field number 1 represents field billing; field number 2 represents field test. In Fortran, the field number 1 represents the field name; field number 2 represents field billing; field number 3 represents field test.

See Also

mxAddField, mxDestroyArray, mxGetFieldByNumber

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

与matlab mxremovefield用法相关的文章

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