Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

mxGetProperty (C and Fortran) - Get value of public property of MATLAB 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 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 want to extract.

Returns

Pointer to the mxArray of the specified propname on success. Returns NULL in C (0 in Fortran) if unsuccessful. 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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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