get - Get states and properties of a System object - MATLAB (original) (raw)
Main Content
Get states and properties of a System object
Syntax
Description
[objVal](#mw%5F28b801d1-5629-4550-a839-7602f4e6fdc1)= get([obj](#mw%5F6a1c226d-fc38-4aae-8aef-97125af4f928))
returns a structure in which the fields contain the current states and public properties of the System objectâ„¢.
`objProp` = get([obj](#mw%5F6a1c226d-fc38-4aae-8aef-97125af4f928),[propName](#mw%5F295cef51-8ef7-4edc-ac60-bbb8671fd738))
returns the value of the specified property propName
of the System objectobj
. 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
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
Use get to query all the states and public properties ofobj
.
The function returns a struct
prop
that contains all the states and public properties of the System object as it elements.
Input Arguments
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
Queried states or public properties.
Data Types: struct
| cell array
| inherited
Version History
Introduced in R2012b