Substitute given values for uncertain elements of uncertain objects

`B = usubs(M,ElementName1,value1,ElementName2,value2,...)`

B = usubs(M,S)

B = usubs(M,...,'-once')

B = usubs(M,...,'-batch')

Use `usubs`

to substitute a specific value
for an uncertain element of an uncertain model object. The value can
itself be uncertain. It needs to be the correct size, but otherwise
can be of any class, and can be an array. Hence, the result can be
of any class. In this manner, uncertain elements act as symbolic placeholders,
for which specific values (which can also contain other placeholders
too) can be substituted.

`B = usubs(M,ElementName1,value1,ElementName2,value2,...)`

sets the elements in `M`

, identified by `ElementName1`

, `ElementName2`

,
etc., to the values in `value1`

, `value2`

,
etc. respectively.

You can also use the character vectors `'NominalValue'`

or `'Random'`

as
any `value`

argument. If you do so, the nominal value
or a random instance of the uncertain element is used. You can partially
specify these character vectors, instead of typing the full expression.
For example, you can use `'Nom'`

or `'Rand'`

.

`B = usubs(M,S)`

instantiates the uncertain
elements of `M`

to the values specified in the structure `S`

.
The field names of `S`

are the names of the uncertain
elements to replace. The values are the corresponding replacement
values. To provide several replacement values, make `S`

a
struct array, where each struct contains one set of replacement values.
A structure such as `S`

typically comes from robustness
analysis commands such as `robstab`

, `usample`

,
or `wcgain`

.

`B = usubs(M,...,'-once')`

performs vectorized
substitution in the uncertain model array `M`

. Each
uncertain element is replaced by a single value, but this value may
change across the model array. To specify different substitute values
for each model in the array `M`

, use:

A cell array for each

`valueN`

that causes the uncertain element`ElementNameN`

in`M(:,:,k)`

to be replaced by`valueN(k)`

. For example, if`M`

is a 2-by-3 array, then a 2-by-3 cell array`value1`

replaces`ElementName1`

of the model`M(:,:,k)`

with the corresponding`value1(k)`

.A struct array

`S`

that specifies one set of substitute values`S(k)`

for each model`M(:,:,k)`

.

Numeric array formats are also accepted for `value1,value2,...`

.
For example, `value1`

can be a 2-by-3 array of LTI
models, a numeric array of size `[size(name1) 2 3]`

,
or a 2-by-3 matrix when the uncertain element `name1`

is
scalar-valued. The array sizes of `M`

, `S`

, `value1,value2,...`

must
agree along non-singleton dimensions. Scalar expansion takes place
along singleton dimensions.

Vectorized substitution (`'-once'`

) is the
default for model arrays when no substitution method is specified.

`B = usubs(M,...,'-batch')`

performs batch
substitution in the uncertain model array `M`

. Each
uncertain element is replaced by an array of values, and the same
values are used for all models in `M`

. In batch substitution, `B`

is
a model array of size `[size(M) VS]`

, where `VS`

is
the size of the array of substitute values.

Was this topic helpful?