matlab mxsetproperty函数语法

发表matlab mxsetproperty函数相关文章
一句话说明: Set value of public property of MATLAB object

mxSetProperty (C and Fortran)

Set value of public property of MATLAB object

C Syntax

#include "matrix.h"
void mxSetProperty(mxArray *pa, mwIndex index,
  const char *propname, const mxArray *value);

Fortran Syntax

subroutine mxSetProperty(pa, index, propname, value)
mwPointer pa, value
mwIndex index
character*(*) propname

Arguments

pa

Pointer to an mxArray which is an object.

index

Index of the desired element of the object array.

In C, the first element of an mxArray has an index of 0. The index of the last element is N-1, where N is the number of elements in the array. In Fortran, the first element of an mxArray has an index of 1. The index of the last element is N, where N is the number of elements in the array.

propname

Name of the property whose value you are assigning.

value

Pointer to the mxArray you are assigning.

Description

Use mxSetProperty to assign a value to the specified property. In pseudo-C terminology, mxSetProperty performs the assignment:

pa[index].propname = value;

Property propname must be an existing, public property and index must be within the bounds of the mxArray. Use mxGetNumberOfElements or mxGetM and mxGetN to test the index value.

mxSetProperty makes a copy of the value before assigning it as the new property value. This might be a concern if the property uses a large amount of memory. There must be sufficient memory (in the heap) to hold the copy of the value.

See Also

mxGetProperty

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

与matlab mxsetproperty用法相关的文章

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