| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "matrix.h" void mxSetProperty(mxArray *pa, mwIndex index, const char *propname, const mxArray *value);
mwPointer mxSetProperty(pa, index, propname, value) mwPointer pa, value mwIndex index character*(*) propname
Pointer to an mxArray which is an object.
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.
Name of the property whose value you are assigning.
Pointer to the mxArray you are assigning.
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.
![]() | mxSetPr (C and Fortran) |

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 |