EXTRACT

Purpose:

Extracts a portion of a series or table.

Syntax:

EXTRACT(series, start, length, offset)

series

-

A series or table.

start

-

An integer value for the starting point.

length

-

An integer value for the number of points to be extracted. -1 implies extract to the end of the series

offset

-

Optional. A real, the X offset of the resulting series. Default is the X value of the starting point.

Returns:

A series or table.

Example:

extract(W1, 1, 512)

 

extracts the first 512-point subset series from Window 1. This is equivalent to W1[1..512].

Example:

W1: 1..10

W2: extract(W1, 4, 3)

 

results is the series {4, 5, 6}. The DELTAX remains the same while the XOFFSET is equal to 3, the x-value of the 4th point.

Example:

W1: gnorm(100, 1)

W2: extract(W1, 1, 2 * length(W1))

 

copies the series from W1 to W2 and pads it with enough zeros to equal two times the original series length.

Example:

W1: gnorm(100, 1)

W2: extract(W1, 10, -1)

 

extracts from W1 points 10 through the end of the series.

Example:

W2: extract(W1, 10, -1, 0.0)

 

Same as above, except the XOFFSET of the result is set to 0.0.

Remarks:

If start is negative, zeros are prepended to the result. If the number of points to extract is greater than the series or table length, the result is padded with zeros.

 

See COLEXTRACT to extract a column specific number of points from each column of an array.

 

See EXTRACTWIN to extract a section of a series from multiple Windows.

 

See SEREXTRACT to extract multiple sections from the same series.

 

See XEXTRACT to extract a section of a series based on X values.

 

See Also:

COL

COLEXTRACT

CONCAT

CUREXTRACT

CUT

DECIMATE

EXTRACTWIN

LENGTH

RAVEL

REGION

REMOVE

REVERSE

ROW

SEREXTRACT

SERPAD

XEXTRACT

XEXTRACTWIN