| Creating and Manipulating Models | ![]() |
Accessing Property Values Using get
You access the property values of an LTI model sys with get. The syntax is
where the string PropertyName is either the full property name, or any abbreviation with enough characters to identify the property uniquely. For example, typing
h = tf(100,[1 5 100],'inputname','voltage',... 'outputn','current',... 'notes','A simple circuit') get(h,'notes')
To display all of the properties of an LTI model sys (and their values), use the syntax get(sys). In this example,
num: {[0 0 100]} den: {[1 5 100]} Variable: 's' Ts: 0 ioDelay: 0 InputDelay: 0 OutputDelay: 0 InputName: {'voltage'} OutputName: {'current'} InputGroup: [1x1 struct] OutputGroup: [1x1 struct] Notes: {'A simple circuit'} UserData: []
Notice that default (output) values have been assigned to any LTI properties in this list that you have not specified.
Finally, you can also access property values using direct structure-like referencing. This topic is explained in the next section.
| Setting LTI Properties | Direct Property Referencing Using Dot Notation | ![]() |
© 1994-2005 The MathWorks, Inc.