XSEREXTRACT

Purpose:

Extracts multiple sections from a series based on X values.

Syntax:

XSEREXTRACT(series, xstart, xend, offset)

series

-

A series.

xstart

-

A series. A list of starting X values.

xend

-

A series. A list of ending X values.

offset

-

Optional. A series, a list of X offsets for the result. Defaults to xstart, the starting X values.

Returns:

A series for a series input or a multi-column series for a multi-column input.

Example:

W1: 0..0.2..2

W2: xserextract(w1, {0, 0.8, 1.0}, {0.4, 1.2, 1.6})

W3: concat(xextract(w1, 0, 0.4), xextract(w1, 0.8, 1.2), xextract(w1, 1.0, 1.6))

W4: w2 - w3

 

W1 == {0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0}

W2 == {0.0, 0.2, 0.4, 0.8, 1.0, 1.2, 1.0, 1.2, 1.4, 1.6}

W3 == {0.0, 0.2, 0.4, 0.8, 1.0, 1.2, 1.0, 1.2, 1.4, 1.6}

W4 == {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}

 

W1 contain 11 values ranging from 0.0 to 2.0 with a DELTAX of 0.2.

 

W2 extracts 3 segments from W1. The segments start at X values 0, 0.8 and 1.0. The segments end at X values, 0.4, 1.2 and 1.6. The segments are combined to produce a single series.

 

W3 performs the same operation using CONCAT and XEXTRACT.

 

W4 shows that W2 == W3, the two segment extraction operations are identical.

Remarks:

If xstart is before the start of the series, zeros are prepended to the result.

 

If xend is beyond the end of the series, the result is appended with zeros.

 

See SEREXTRACT to perform the extraction with indices.

 

See XCOLEXTRACT to extract segments from a series based on X values and place the segments into columns.

See Also:

COLEXTRACT

EXTRACT

SEREXTRACT

XCOLEXTRACT

XEXTRACT

XTOIDX