<selectRandomNumbers/>
<selectRandomNumbers/>
creates named variants from a generates random numbers from a specified range of
values or within a normal distribution around a specified mean.
Attributes and Properties
Attribute | Type | Values |
---|---|---|
asList = "…" | "true" "false" | |
assignNames = "…" | ||
assignNamesSkip = "…" | ||
displayDecimals = "…" | ||
displayDigits = "…" | ||
displaySmallAsZero = "…" | ||
exclude = "…" | ||
from = "…" | number | |
mean = "…" | number | |
numToSelect = "…" | integer | |
padZeros = "…" | ||
standardDeviation = "…" | number | |
step = "…" | number | |
to = "…" | number | |
type = "…" | text | "uniform" "discreteuniform" "gaussian" |
variance = "…" | number |
Property | Type |
---|---|
$s.from | number |
$s.mean | number |
$s.numToSelect | integer |
$s.standardDeviation | number |
$s.step | number |
$s.to | number |
$s.type | text |
$s.variance | number |
Example: Default <selectRandomNumbers/>
Without any attributes specified, the default selection type
is uniform
, and the default interval is . Select a different page variant to view a different selection.
Example: numToSelect
The <selectRandomNumbers/>
component is used with the numToSelect
attribute to select multiple random values in the default interval . The default type
is uniform
. The component is nested within an <asList>
component for greater clarity when rendering.
Example: assignNames
The assignNames
attribute is used to specify unique identifiers for each selection where one more than one selection is required. If only one selection is required, the name
of the selection itself assumes the selected value.
Select a different page variant to view a different selection.
Example: from, to
The <selectRandomNumbers/>
component is used with the from
and the to
attributes to modify the default selection interval. The default type
is uniform
.
Select a different page variant to view a different selection.
Example: type = “discreteUniform”
The type
attribute of the <selectRandomNumbers/>
component is specified as discreteUniform
. The discreteUniform
selection generates values from an evenly spaced range defined by the attributes to
, from
, and step
. If left unspecified, the default step
is 1.
Select a different page variant to view a different selection.
Example: exclude
The type
attribute of the <selectRandomNumbers/>
component is specified as discreteUniform
. Values can be excluded from the specified range used with this type using the exclude
attribute.
Select a different page variant to view a different selection.
Example: step
The type
attribute of the <selectRandomNumbers/>
component is specified as discreteUniform
. The discreteUniform
selection generates values from an evenly spaced range defined by the attributes to
, from
, and step
. If left unspecified, the default step
is 1.
Select a different page variant to view a different selection.
Example: type = “gaussian”
The type
attribute of the <selectRandomNumbers/>
component is specified as gaussian
. The gaussian
selection generates standard normal variables (mean 0, variance 1). Alternatively, the mean
as well as the variance
or the standardDeviation
attributes may be defined.
Select a different page variant to view a different selection.
Example: gaussian with mean and variance
The type
attribute of the <selectRandomNumbers/>
component is specified as gaussian
. The gaussian
selection generates standard normal variables (mean 0, variance 1). In this example, the mean
and the variance
are defined with attributes.
Select a different page variant to view a different selection.
Example: gaussian with mean and standardDeviation
The type
attribute of the <selectRandomNumbers/>
component is specified as gaussian
. The gaussian
selection generates standard normal variables (mean 0, variance 1). In this example, the mean
and the standardDeviation
are defined with attributes.
Select a different page variant to view a different selection.