Labels - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

DataSeries/Labels

obtain labels of a DataSeries

DataSeries/SubsLabel

create a DataSeries with a different label

 Calling Sequence Labels(DS) Labels(DS, i) SubsLabel(DS, i, label)

Parameters

 DS - a DataSeries object i - a nonzero integer or valid label label - a new label

Description

 • The Labels command returns the list of labels for a DataSeries object, or a single label. A single label is specified by its position.
 • The SubsLabel command creates a DataSeries object with a different label. Note: this does not modify the given DataSeries object DS - it just returns a new DataSeries object. See the Examples section below.
 • If i is negative, it specifies the position counting from the end. For example, -2 specifies the label before last.

Examples

 > $\mathrm{ds}≔\mathrm{DataSeries}\left(\left[5,6,8\right],\mathrm{labels}=\left[a,b,c\right]\right)$
 ${\mathrm{ds}}{≔}\left[\begin{array}{cc}{a}& {5}\\ {b}& {6}\\ {c}& {8}\end{array}\right]$ (1)
 > $\mathrm{Labels}\left(\mathrm{ds}\right)$
 $\left[{a}{,}{b}{,}{c}\right]$ (2)
 > $\mathrm{Labels}\left(\mathrm{ds},2\right)$
 ${b}$ (3)

The statement below does not modify $\mathrm{ds}$.

 > $\mathrm{ds2}≔\mathrm{SubsLabel}\left(\mathrm{ds},1,z\right)$
 ${\mathrm{ds2}}{≔}\left[\begin{array}{cc}{z}& {5}\\ {b}& {6}\\ {c}& {8}\end{array}\right]$ (4)
 > $\mathrm{Labels}\left(\mathrm{ds}\right)$
 $\left[{a}{,}{b}{,}{c}\right]$ (5)
 > $\mathrm{Labels}\left(\mathrm{ds2}\right)$
 $\left[{z}{,}{b}{,}{c}\right]$ (6)

We can make the change apply to $\mathrm{ds}$ by assigning the result to $\mathrm{ds}$.

 > $\mathrm{ds}≔\mathrm{SubsLabel}\left(\mathrm{ds},-1,y\right)$
 ${\mathrm{ds}}{≔}\left[\begin{array}{cc}{a}& {5}\\ {b}& {6}\\ {y}& {8}\end{array}\right]$ (7)
 > $\mathrm{Labels}\left(\mathrm{ds}\right)$
 $\left[{a}{,}{b}{,}{y}\right]$ (8)
 > $\mathrm{SubsLabel}\left(\mathrm{ds},b,x\right)$
 $\left[\begin{array}{cc}{a}& {5}\\ {x}& {6}\\ {y}& {8}\end{array}\right]$ (9)

Compatibility

 • The DataSeries/Labels and DataSeries/SubsLabel commands were introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.

 See Also