isprop
Determine if property is defined by object
Description
returns logical tf = isprop(obj,PropertyName)1 (true) if the specified
PropertyName is a property of object obj.
Otherwise, isprop returns 0
(false). If obj is an array,
isprop returns a logical array the same size as obj.
Each true element of tf corresponds to an element of
obj that has the property PropertyName.
Examples
Input Arguments
Tips
If
objis a table or timetable,ispropreturnstrueif the property is inobj.Propertiesorobj.Properties.CustomProperties.Classes can control access to property values by defining property attributes. For example, a property can be
private, which means it is readable and writable only inside the class that defines it.ispropindicates that these properties exist regardless of whether you have direct access to that property. For more information, see Property Attributes.ispropalways returnsfalsewhen called with any value type ofPropertyNameother than a character vector or string scalar. For example, if you pass in a string array forPropertyName,ispropreturnsfalseeven if one or more of the array elements are properties of the object.If
objis an empty object or an array of empty objects,ispropreturns an empty logical array, even ifPropertyNameis a property ofobj.
Extended Capabilities
Version History
Introduced before R2006a

