mxSetProperty (C and Fortran) - Set value of property of MATLAB class object

C Syntax

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

Fortran Syntax

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

Arguments

pa

Pointer to an mxArray which is a class 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 second element has an index of 1, and the last element has an index of N-1, where N is the total number of elements in the mxArray.

In Fortran, the first element of an mxArray has an index of 1, the second element has an index of 2, and the last element has an index of N, where N is the total number of elements in the mxArray.

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;

mxSetProperty makes a copy of the value before assigning it as the new property value. This may be a concern if the property uses a large amount of memory.

See Also

mxGetProperty

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS