usubs
Substitute given values for uncertain elements of uncertain objects
Syntax
Description
sets the specified uncertain elements in an uncertain system or matrix
B
= usubs(M
,ElementName
1,value
1,...,ElementName
N,value
N)M
to the specified values. For instance, you can use
usubs
to replace uncertain parameters in a uss
model
by particular numeric values. You can also generate an array of instantiations of
M
by specifying an array of substitute values.
instantiates the uncertain elements of B
= usubs(M
,S
)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. This
syntax is useful when you when have multiple uncertain models that use the same set of
parameters, and you want to evaluate all models at the same parameter values. It is also
useful for substitution of values obtained with robustness analysis commands such as
robstab
, usample
, or
wcgain
. To provide several replacement values, make
S
a struct array, where each struct contains one set of replacement
values.
performs vectorized substitution in the uncertain model array B
= usubs(M
,___,"-once")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:
An array for each
value
N
that causesusubs
to replace the uncertain elementElementName
N
inM(:,:,k)
byvalueN(k)
. For example, ifM
is a 2-by-3 array, then a 2-by-3 cell arrayvalue1
replacesElementName1
of the modelM(:,:,k)
with the correspondingvalue1(k)
.A struct array
S
that specifies one set of substitute valuesS(k)
for each modelM(:,:,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 a model arrays
when no substitution method is specified.
performs batch substitution in the uncertain model array B
= usubs(M
,___,"-batch")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.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006a