addprop (dynamicprops) - Add dynamic property
Syntax
P = addprop(Hobj,'PropName')
Description
P = addprop(Hobj,'PropName') adds a property
named PropName to each object in array Hobj.
The class definition is not affected by the addition of dynamic properties.
Note that you can add dynamic properties only to objects derived from
the dynamicprops class. You can set and retrieve
the data in dynamic properties as you would any property.
The output argument P is an array the same
size as Hobj of meta.DynamicProperty objects,
which you can use to assign SetMethod and GetMethod functions
to the property. These functions operate just like property set and
get access methods.
See Dynamic Properties — Adding Properties to an Instance for
more information and examples.
See Also
handle, dynamicprops
 | addpref | | addproperty |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit