set - Set properties of linearization I/Os and operating points

Syntax

set(ob)
set(ob,'PropertyName',val)
ob.PropertyName=val

Graphical Interface

As an alternative to the set function, set properties of linearization I/Os and operating points in the Simulink Control Design GUI. See Inspecting Analysis I/Os and Specifying Operating Points in the Simulink Control Design getting started documentation.

Description

set(ob) displays all editable properties of the object, ob, which can be a linearization I/O object, an operating point object, or an operating point specification object. Create ob using findop, getlinio, linio, operpoint, or operspec.

set(ob,'PropertyName',val) sets the property, PropertyName, of the object, ob, to the value, val. The object, ob, can be a linearization I/O object, an operating point object, or an operating point specification object. Create ob using findop, getlinio, linio, operpoint, or operspec.

ob.PropertyName=val is an alternative notation for assigning the value, val, to the property, PropertyName, of the object, ob. The object, ob, can be a linearization I/O object, an operating point object, or an operating point specification object. Create ob using findop, getlinio, linio, operpoint, or operspec.

Examples

Create an operating point object for the Simulink model, magball:

op_cond=operpoint('magball');

Use the set function to get a list of all editable properties of this object:

set(op_cond)

This function returns the properties of op_cond.

ans = 
     Model: {}
    States: {}
    Inputs: {}
      Time: {}

To set the value of a particular property of op_cond, provide the property name and the desired value of this property as arguments to set. For example, to change the name of the model associated with the operating point object from 'magball' to 'Magnetic Ball', type:

set(op_cond,'Model','Magnetic Ball')

To view the property value and verify that the change was made, type:

op_cond.Model

which returns

ans =
Magnetic Ball

Because op_cond is a structure, you can set any properties or fields using dot-notation. First, produce a list of properties of the second States object within op_cond, as follows:

set(op_cond.States(2))
ans = 
                   Nx: {}
                Block: {}
                    x: {}
                   Ts: {}
           SampleType: {}
    inReferencedModel: {}
          Description: {}

Now, use dot-notation to set the x property to 8:

op_cond.States(2).x=8;

To view the property and verify that the change was made, type

op_cond.States(2)

which displays

(1.) magball/Magnetic Ball Plant/Current
      x: 8       

See Also

findop, get, linio, operpoint, operspec, setlinio

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS