ReferenceselectFromSequence

<selectFromSequence>

<selectFromSequence> is a Math component that creates named variants from a user-defined range of numerical (or alphabetical) values. Selections generate variants of the document.

Attributes and Properties

Attributes for <selectFromSequence>
AttributeTypeValues
asList = "…""true" "false"
displayDecimals = "…"
displayDigits = "…"
displaySmallAsZero = "…"
exclude = "…"
excludeCombinations = "…"
from = "…"
length = "…"
numToSelect = "…"integer
padZeros = "…"
sortResults = "…"boolean"true" "false"
step = "…"
to = "…"
type = "…""number" "math" "letters"
withReplacement = "…"boolean"true" "false"
Props for <selectFromSequence name="s">
PropertyType
$s.numToSelectinteger
$s.sortResultsboolean
$s.withReplacementboolean

Example: Default <selectFromSequence>

The default <selectFromSequence> has a sequence range from 11 to 1010.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Example: Generate multiple selections

Three numbers are selected between -5 and 5 (stepping in increments of 0.5). Individual selections can be accessed using array notation.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.

Example: Assign descriptive names to selections

Three numbers are selected between -5 and 5 (stepping in increments of 0.5). Selections can be assigned more descriptive names by defining individual components which reference the selected values.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: numToSelect

The numToSelect attribute allows for selection of multiple values within the range of a single <selectFromSequence> component. Multiple selections are made without replacement, unless the withReplacement attribute is also specified.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: sortResults

The sortResults attribute sorts the selected results in increasing order.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: from, to

The from and to attributes specify the endpoints of the selection interval.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: step

The step attribute specifies the size of each increment in the sequence. The default step is 11

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: exclude

The exclude attribute specifies values to exclude in the selection.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: withReplacement

If selection with replacement is the desired behavior, use the withReplacement attribute.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: excludeCombinations

The excludeCombinations attribute can be used to exclude unfavorable combinations of parameters. In this example, the exclusions have been designed to prevent the condition that the coefficients in the expression result in a sum of 00.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.


Attribute Example: type

The type attribute takes either letters or number as a text input. If unspecified, the default type is number.

Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.