This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Access model property values


Value = get(sys,'PropertyName')
Struct = get(sys)


Value = get(sys,'PropertyName') returns the current value of the property PropertyName of the model object sys. 'PropertyName' can be the full property name (for example, 'UserData') or any unambiguous case-insensitive abbreviation (for example, 'user'). See reference pages for the individual model object types for a list of properties available for that model.

Struct = get(sys) converts the TF, SS, or ZPK object sys into a standard MATLAB® structure with the property names as field names and the property values as field values.

Without left-side argument,


displays all properties of sys and their values.


collapse all

Create the following discrete-time SISO transfer function model:


Specify the sample time as 0.1 seconds and input channel name as Voltage.

h = tf(1,[1 2],0.1,'InputName','Voltage')
h =
  From input "Voltage" to output:
  z + 2
Sample time: 0.1 seconds
Discrete-time transfer function.

Display all the properties of the transfer function.

       Numerator: {[0 1]}
     Denominator: {[1 2]}
        Variable: 'z'
         IODelay: 0
      InputDelay: 0
     OutputDelay: 0
              Ts: 0.1000
        TimeUnit: 'seconds'
       InputName: {'Voltage'}
       InputUnit: {''}
      InputGroup: [1x1 struct]
      OutputName: {''}
      OutputUnit: {''}
     OutputGroup: [1x1 struct]
           Notes: [0x1 string]
        UserData: []
            Name: ''
    SamplingGrid: [1x1 struct]

Display the numerator of the transfer function.

num = get(h,'Numerator')
num = 1x1 cell array
    {1x2 double}

The numerator data is stored as a cell array, thus the Numerator property is a cell array containing the row vector [0 1].

ans = 1×2

     0     1

Display the sample time Ts of the transfer function.

ans = 0.1000

Alternatively, use dot notation to access the property value.

ans = 0.1000


An alternative to the syntax

Value = get(sys,'PropertyName')

is the structure-like referencing

Value = sys.PropertyName

For example,


return the values of the sample time, A matrix, and UserData property of the (state-space) model sys.

Introduced before R2006a