# CLIP

## Purpose:

Modifies the points in a series or table
according to specified maximum and minimum y values.

## Syntax:

CLIP(series, maxthresh,
minthresh)

series |
- |
A series or multi-column
table. |

maxthresh |
- |
Optional. A real, the upper Y limit. Defaults
to the maximum of the input series. |

minthresh |
- |
Optional. A real, the upper Y limit. Defaults
to the minimum of the input series. |

## Returns:

A series or table.

## Example:

W1: gsin(100,0.01)

clip(W1, 0.5, -0.5)

modifies the series in Window 1 so that
all points equal to or above the maxthresh value are set to 0.5, and all
points equal to or below the minthresh value are set to –0.5.

## Example:

W2: {1, 2, 3, 4, 5, 4, 3, 2, 1}

clip(W2, 4)

modifies the series in Window 2 so that
all points equal to or above the maxthresh value are set to 4. The resulting
series is {1,
2, 3, 4, 4, 4, 3, 2, 1}.

## Example:

clip(W3, 4.5, -3.0)

modifies the series in Window 3 so that
all points equal to or above the maxthresh value are set to 4.5, and all
points equal to or below the minthresh value are set to -3.0.

## Example:

clip(W4, max(W4), -2.0)

effectively sets only a minthresh (of
-2.0) because the maxthresh is the highest peak of the series in W4.

## Example:

W5 - clip(W5,1.0,-1.0)

performs an "inverse" CLIP by
modifying those points between the thresholds from the original series
in W5.

## Remarks:

For complex series, CLIP operates on the
REAL or MAGNITUDE part only.

If only one threshold argument is given,
DADiSP assumes it is the maxthresh. If no threshold arguments are given,
DADiSP will use the MAX and MIN values of the series as default arguments
and CLIP will return an exact copy of the current series.

CLIP does not eliminate any points from
a series, although it can be used to modify the value of points in a series.

## See Also:

<
<= > >= == != (Conditional Operators)

DECIMATE

DELETE

MAX

MIN

REMOVE