Documentation Center

  • Trial Software
  • Product Updates

sdo.SampledParameter class

Package: sdo
Superclasses: param.Continuous

Sampled parameter

Syntax

p = sdo.SampledParameter(paramname)
p = sdo.SampledParameter(paramname,paramvalue)
p = sdo.SampledParameter(paramname,paramvalue,samplevalues)

Description

A sampled parameter is a numeric parameter with a nominal value and set of sample values. The parameter can be scalar- or matrix-valued.

Typically, you use sampled parameters to create parametric models and evaluate model variations for robustness testing.

Construction

p = sdo.SampledParameter(paramname) constructs a sdo.SampledParameter object for a parameter and assigns the specified name to the Name property and default values to the remaining properties.

p = sdo.SampledParameter(paramname,paramvalue) assigns the specified parameter value to the Value property.

p = sdo.SampledParameter(paramname,paramvalue,samplevalues) assigns the specified sample values to the SampleValues property.

Input Arguments

paramname

Parameter name, specified as a string inside single quotes (' ').

paramvalue

Scalar or matrix parameter value.

samplevalues

Scalar, matrix or cell array of parameter sample values.

Properties

Free

Flag specifying whether the parameter is tunable or not.

Set the Free property to true (1) for tunable parameters and false (0) for parameters you do not want to tune (fixed).

The dimension of this property must match the dimension of the Value property.

For matrix-valued parameters, you can:

  • Fix individual matrix elements. For example p.Free = [true false; false true) or p.Free([2 3]) = false.

  • Use scalar expansion to fix all matrix elements. For example p.Free = false.

Default: true (1)

Info

Structure array specifying parameter units and labels.

The structure has Label and Unit fields.

The array dimension must match the dimension of the Value property.

Use this property to store parameter units and labels that describe the parameter. For example p.Info(1,1).Unit = 'N/m'; or p.Info(1,1).Label = 'spring constant'.

Default: '' for both Label and Unit fields

Maximum

Upper bound for the parameter value.

The dimension of this property must match the dimension of the Value property.

For matrix-valued parameters, you can:

  • Specify upper bounds on individual matrix elements. For example p.Maximum([1 4]) = 5.

  • Use scalar expansion to set the upper bound for all matrix elements. For example p.Maximum = 5.

Default: Inf

Minimum

Lower bound for the parameter value.

The dimension of this property must match the dimension of the Value property.

For matrix-valued parameters, you can:

  • Specify lower bounds on individual matrix elements. For example p.Minimum([1 4]) = -5.

  • Use scalar expansion to set the lower bound for all matrix elements. For example p.Minimum = -5.

Default: –Inf

Name

Parameter name.

This property is read-only and is set at object construction.

Default: ''

SampleValues

Set of sample values for the parameter.

Must be a cell array of values. The elements of the cell array must have the same dimension as the Value property. If the Value property is a scalar, this property can be a vector.

Default: [-1 1]

Scale

Scaling factor used to normalize the parameter value.

The dimension of this property must match the dimension of the Value property.

For matrix-valued parameters, you can:

  • Specify scaling for individual matrix elements. For example p.Scale([1 4]) = 1.

  • Use scalar expansion to set the scaling for all matrix elements. For example p.Scale = 1.

Default: 1

Value

Scalar or matrix value of a parameter.

The dimension of this property is set at object construction.

Default: 0

Methods

Inherited Methods

isrealDetermine if parameter value, minimum and maximum are real

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Examples

Specify sample values during construction.

 p = sdo.SampledParameter('K',eye(2),{0.9*eye(2) 1.1*eye(2)});
 

Construct a sampled parameter object and set its sample values.

 p = sdo.SampledParameter('K',eye(2));
 p.SampleValues = {0.9*eye(2) 1.1*eye(2)};

See Also

|

How To

Was this topic helpful?