# Clip Array (G Dataflow)

Version:

Clips the elements of an array to within the bounds of specific upper limit and lower limit.

## input array

Input array to be clipped.

## upper limit

Greater than or equal to the lower limit. If upper limit is less than lower limit, this node sets the sequence clipped array to an empty array and returns an error.

Default: 0

## lower limit

Less than or equal to the upper limit.

Default: 0

## error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error

## clipped array

The input array subjected to the upper limit and lower limit.

## error out

Error information. The node produces this output according to standard error behavior.

## Algorithm for Clipping Arrays

Let the sequence Y represent the output sequence clipped array. Then the elements of Y are related to the elements of input array by the following equation:

${Y}_{i}=\left(\begin{array}{cc}a& {x}_{i}>a\\ {x}_{i}& b\le {x}_{i}\le a\\ b& {x}_{i}

for i = 0, 1, 2, ..., n - 1,

where

• x is input array
• n is the number of elements in input array
• a is upper limit
• b is lower limit

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported