DADiSP Worksheet Functions > Function Categories > XY Functions > XVALS

 

XVALS

Purpose:

Returns the X values from a series.

Syntax:

XVALS(series, item, dt)

 

series

-

An input series

item

-

Optional. An integer, the series item. Set to -1 for all items. Defaults to 1, the primary item.

dt

-

Optional. An integer, the date/time format if the horizontal units are of date/time type.

0:

date/time relative to starting date/time (default)

1:

absolute date/time

Returns:

A new series or table containing the X values of the series.

Example:

W1: grand(5, 2)

xvals(W1)

 

returns the series {0.0, 2.0, 4.0, 6.0, 8.0}.

Example:

xvals(W1)

 

returns a series that consists of the X values of W1.

Example:

W1: grand(3, 1);settime("13:00");sethunits("time")

W2: xvals(w1)

W3: xvals(w1, 1, 1)

 

W1 contains the relative time values 0:00:00, 0:00:01, 0:00:02.

 

W2 contains the absolute time values 13:00:00, 13:00:01, 13:00:02.

Example:

W1: rand(10, 3)

W2: rand(10, 3)

W3: xy(w1, w2)

W4: xvals(w3, -1)

 

W3 contains three XY series of length 10.

 

W4 contains a 10x3 series where each column contains the X values of each XY series in W3. In this case, W4 == W1.

Remarks:

The dt option applies to series with date or time horizontal units. For dt = 0, date values are relative to the starting date and time values are relative to the starting time.

 

Use IDX to return the indices of a series or array.

 

Use XTOIDX to convert X values to indices.

 

See XMINMAX to return the minimum and maximum X values of a series.

See Also:

IDX

SETHUNITS

XMINMAX

XY

XTOIDX

YVALS