Set Up System Objects

Create a New System object

You must create a System object™ before using it. You can create the object at the MATLAB® command line or within a program file. Your command-line code and programs can pass MATLAB variables into and out of System objects.

For general information about working with MATLAB objects, see Object-Oriented Programming in the MATLAB documentation.

Retrieve System object Property Values

System objects have properties that configure the object. You use the default values or set each property to a specific value. The combination of a property and its value is referred to as a Name-Value pair. You can display the list of relevant property names and their current values for an object by using the object handle only, <handleName>. Some properties are relevant only when you set another property or properties to particular values. If a property is not relevant, it does not display.

To display a particular property value, use the handle of the created object followed by the property name: <handle>.<Name>.


This example retrieves and displays the TransferFunction property value for the previously created DigitalFilter object:


Set System object Property Values

You set the property values of a System object to model the desired algorithm.

    Note:   When you use Name-Value pair syntax, the object sets property values in the order you list them. If you specify a dependent property value before its parent property, an error or warning may occur.

Set Properties for a New System object

To set a property when you first create the object, use Name-Value pair syntax. For properties that allow a specific set of string values, you can use tab completion to select from a list of valid values.

H1 = dsp.DigitalFilter('CoefficientsSource','Input port')


  • H1 is the handle to the object

  • dsp is the package name.

  • DigitalFilter is the object name.

  • CoefficientsSource is the property name.

  • 'Input port' is the property value.

Set Properties for an Existing System object

To set a property after you have created an object, use either of the following syntaxes:

H1.CoefficientsSource = 'Property'



Use Value-Only Inputs

Some object properties have no useful default values or must be specified every time you create an object. For these properties, you can specify only the value without specifying the corresponding property name. If you use value-only inputs, those inputs must be in a specific order, which is the same as the order in which the properties are displayed. Refer to the object reference page for details.

H2 = dsp.FIRDecimator(3,[1 .5 1]) 
specifies the DecimationFactor as 3 and the Numerator as [1 .5 1].

Was this topic helpful?