Main Content

get

Get states and properties of a System object

Description

objVal= get(obj) returns a structure in which the fields contain the current states and public properties of the System object™.

example

objProp = get(obj,propName) returns the value of the specified property propName of the System object obj. If propName is a cell array of state and public property names, get returns a cell array with each element corresponding to the queried state or public property.

Examples

collapse all

Use get to query all the states and public properties of the specified System object.

Create a Counter object. Refer to the example in setup for the class definition of counter

obj = Counter;

Use get to query all the states and public properties of obj.

propState = get(obj)

The function returns a struct prop that contains all the states and public properties of the System object as it elements.

Input Arguments

collapse all

System object handle used to access properties, states, and methods specific to the object.

State or public property names to be queried.

Data Types: char | string | cell

Output Arguments

collapse all

Queried states or public properties.

Data Types: struct | cell array | inherited

Version History

Introduced in R2012b