CUT

Purpose:

Extracts the displayed contents of a Window.

Syntax:

CUT(win, cutxy, zeropad)

win

-

Optional. A Window, defaults to the current Window.

cutxy

-

Optional. An integer, the cut mode.

0

:

cut using X displayed range only (default)

1

:

cut using X and Y displayed range

zeropad

-

Optional. An integer, the zero pad mode.

0

:

limit cut range to series extent (default)

1

:

pad beginning and/or end points with zeros if cut range extends beyond the series extent.

Returns:

A series or array.

Example:

W1: gnorm(1000,.01);setx(.2, .5);setxtic(-1)

W2: cut(W1)

W3: W1

 

W1 contains 1000 points of random noise. The X axis is begins at 0.2 and ends at 0.5 and the X tic marks are reset. W2 contains only the data actually displayed in W1, whereas W3 contains all the data in W1 regardless of how it is displayed.

Example:

W1: gnorm(1000,.01);setx(.2, .5);setxtic(-1);sety(-0.5, 0.5)

W2: cut(W1)

W3: cut(W1, 1)

W4: W1

 

Same as above except W3 clips the Y values to -0.5 an 0.5, the Y display range of W1.

Example:

W1: gnorm(1000,.01);setx(-5, 15)

W2: cut(W1)

W3: cut(W1, 0, 1)

 

The data in W1 extends from 0 to 10 but the X axis extends from -5 to 15.

 

W2 displays the same data as W1 since the X display range of W1 is larger than the data X range.

 

W3 zero pads the beginning and ending segments to produce a series that extends from -0.5 to 15.

Remarks:

Cut works on series, arrays and images.

 

See WINCUT to extract a series based on the displayed contents of a window.

 

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

See Also:

EXTRACT

SETVPORT

WINCUT

XEXTRACT