usample
Generate random samples of uncertain variables in a Simulink model
Description
Use this function to generate random samples of uncertain variables in a Simulink® model that contains Uncertain State Space blocks. Such sampling lets you perform Monte Carlo analysis of the model response.
To generate random samples from uncertain elements and models such as
uss
, ufrd
, genss
, or
genfrd
models, use usample
.
generates a random sample of the uncertain variables in the structure
uvals
= usample(uvars
)uvars
. This structure lists the uncertain variables in a Simulink model that contains Uncertain State Space blocks. To obtain the
input uvars
, for a particular Simulink model, use ufind
. The resulting structure
uvals
has fields whose names are the uncertain variable names and
values are the corresponding samples. To apply the sampled values when you simulate the
model, set the Uncertainty value parameter of the Uncertain
State Space block to uvars
.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2009b