mxGetProperty (C and Fortran) - Get property value of MATLAB class object

C Syntax

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

Fortran Syntax

mwPointer mxGetProperty(pa, index, propname)
mwPointer pa
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 want to extract.

Returns

A pointer to the mxArray of the specified propname on success.

Common causes of failure include:

Description

Call mxGetProperty to get the value held in the specified element. In pseudo-C terminology, mxGetProperty returns the value at:

pa[index].propname

See Also

mxSetProperty, mxGetNumberOfElements, mxGetM, mxGetN

  


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