Class: matlab.mixin.SetGet
Package: matlab.mixin
Query specified property values
CV = get(H,Name)
SV = get(H)
get(H)
returns the value of the named property from the objects in the handle array CV
= get(H
,Name
)H
. If H
is scalar, get
returns a single value; if H
is an array, get
returns a cell array of property values. get
matches partial and case-insensitive names that are not ambiguous. Inexact name matching applies only to class properties. Dynamic properties require exact name matches.
If you specify a cell array of property names as the second argument, then get
returns a cell array of values, where each row in the cell corresponds to an element in H
and each column in the cell corresponds to an element in the property name cell array.
If H
is nonscalar and Name
is the name of a dynamic property, get
returns a value only if the property exists in all objects referenced in H
.
returns a structure in which the field names are the object's property names and the values are the current values of the corresponding properties. If SV
= get(H
)H
is nonscalar, then SV
is a numel(H)
-by-1
array of structures.
get(
displays all property names and their current values for the MATLAB® objects with handle H
)H
.
Your subclass can override the matlab.mixin.SetGet
getdisp
method to control how MATLAB displays this information.
Get the value of a property named Data
from an instance of a class derived from matlab.mixin.SetGet
.
propValue = get(obj,'Data');
Override the matlab.mixin.SetGet
class getdisp
method to change how MATLAB displays information returned by get
.