Simulink Control Design™ - MathWorks

(Tuis.) #1
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))

which returns

ans =

Nx: {}
Block: {}
StateName: {}
x: {}
Ts: {}
SampleType: {}
inReferencedModel: {}
Description: {}

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

op_cond.States(2).x=8;

15 Alphabetical List

Free download pdf