Class: handle

Find object


mp = findprop(h,property)


mp = findprop(h,property) returns the object associated with the named property of the object h. property can be a property defined by the class of h or a dynamic property defined only for the object h.

Input Arguments

collapse all

h — handle objecthandle

Handle object, specified as a scalar handle.

property — Name of propertystring

Name of property, specified as a case-sensitive, quoted string.

Output Arguments

collapse all object that is associated with the named property. If findprop does not find the property on the object h, findprop returns a 0-by-1 empty object.



To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.


View Property Attribute Settings

Use findprop to view property attribute settings:

mp = findprop(containers.Map,'Count')
mp = 

  property with properties:

                   Name: 'Count'
            Description: 'Number of pairs in the collection'
    DetailedDescription: ''
              GetAccess: 'public'
              SetAccess: 'private'
              Dependent: 1
               Constant: 0
               Abstract: 0
              Transient: 1
                 Hidden: 0
          GetObservable: 0
          SetObservable: 0
               AbortSet: 0
              GetMethod: []
              SetMethod: []
             HasDefault: 0
          DefiningClass: [1x1 meta.class]
Was this topic helpful?