<sequence>
<sequence>
is a Math
component that defines a sequence of numerical (or alphabetical) values.
Attributes and Properties
Attribute | Type | Values |
---|---|---|
asList = "…" | "true" "false" | |
displayDecimals = "…" | ||
displayDigits = "…" | ||
displaySmallAsZero = "…" | ||
exclude = "…" | ||
from = "…" | ||
length = "…" | ||
padZeros = "…" | ||
step = "…" | ||
to = "…" | ||
type = "…" | "number" "math" "letters" |
The <sequence>
component does not have properties.
Example: Default <sequence>
The default <sequence>
lists values from to with step
size .
Example: Using a <sequence>
with a <repeat>
A <sequence>
can be used to define the iteration for a <repeat>
.
Another way to accomplish this would be to use the <repeatForSequence>
component.
Example: the sum of a <sequence>
In the sample code below, the sum of all values in a sequence is obtained by nesting the <sequence/>
in a <sum>
component. This technique works for multiple sequence as well.
Attribute Example: from, to
Use the from
and to
attributes to specify the endpoints of the <sequence>
.
Attribute Example: step
Use the step
attribute to specify the stepping increment for the <sequence>
Attribute Example: length
Use the length
attribute to specify the number of terms in the <sequence>
.
Attribute Example: exclude
The exclude
attribute excludes terms from the <sequence>
.
Attribute Example: type
The type
attribute takes as an input either number
or letters
, and defaults to number
.