Accelerating the pace of engineering and science

Documentation Center

• Trial Software
• Product Updates

randunc

Random values of uncertain parameters

 Note:   randunc will be removed in a future version. For examples of specifying uncertain parameters, see:

Syntax

uncpar=randunc(N,'ParameterName',Range,...)

Description

uncpar=randunc(N,'ParameterName',Range,...) generates random values of uncertain parameters, specified as comma separated 'ParameterName' and Range value pairs. Range specifies the lower and upper bounds for the uncertain parameter. Enter Range as a cell array {[Min],[Max]} for vector- and scalar-valued parameters or vector [Min,Max] for scalar-valued parameters. Dimensions of each cell element must match the corresponding parameter dimension. N is the number of samples inside the hypercube formed by Min and Max of each parameter. uncpar contains the uncertain parameter values.

Alternatives

To generate random values of uncertain parameters using the GUI:

1. In the Simulink® model, double-click the Signal Constraint block to open the Block Parameters: Signal Constraint window.

2. In the Block Parameters window, select Optimization > Uncertain Parameters to open the Uncertain Parameters dialog box.

3. Select Random (Monte Carlo) as the Sampling method.

4. Specify the number of samples in the Number of samples field.

5. Specify the uncertain parameters and their range:

1. Click Add to open the Add Parameters dialog box.

2. Select the uncertain parameters and click OK to add them to the Uncertain Parameters dialog box.

3. Specify the range for the corresponding parameter in the Min and Max columns.

More About

expand all

Algorithms

For parameters p with range specified as [Min,Max] or {[Min],[Max]} , randunc interprets the range of the uncertain parameters as:

```Min(i,j) <= p(i,j) <= Max(i,j)
```

randunc generates a set of uncertain parameter values consists of the following:

• All vertices of the hypercube specified by Min and Max values of the parameters. The total number of vertices of the hypercube is 2S, where S is the number of uncertain parameters.

• N random samples inside the hypercube.

See Also

Was this topic helpful?