# Decimate (Continuous) (G Dataflow)

Last Modified: January 9, 2017

Continuously decimates an input sequence according to a specific decimating factor and averaging method.

## reset

A Boolean that specifies whether to initialize the decimation.

 True Initializes the decimation. False Does not initialize the decimation.

If reset is True or if this node runs for the first time, this node initializes the decimation from the sample of x specified by start index. When the node runs again with reset set to False, this node initializes the decimation from the final state of the previous call to the node.

Processing a Large Data Sequence Consisting of Smaller Blocks

To process a large data sequence that consists of smaller blocks, set reset to True for the first block and to False for all remaining blocks. You also can set reset to True at regular intervals of blocks to periodically reset the sample from which the decimation begins.

Default: False

## input array

The first input sequence.

This input can be an array of double-precision floating-point numbers or an array of complex double-precision, floating-point numbers.

## decimating factor

The factor by which this node decimates the input sequence. decimating factor must be greater than zero. If decimating factor is greater than the number of elements in input array or less than or equal to zero, this node sets decimated array to an empty array and returns an error.

Default: 1

## start index

Determines from which sample in the input array the decimation starts. start index must be greater than or equal to zero.

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

## averaging?

A Boolean that determines the method this node uses to handle the data points in the input sequence.

 True Each output point in decimated array is the mean of the decimating factor input points. False Keeps every decimating factor point from input array.

Default: False

## decimated array

Decimated sequence of the input sequence.

## error out

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

## Algorithm for Continuous Decimation

If Y represents the output sequence decimated array, this node obtains the elements of the sequence Y using the following equation.

If averaging? is False, ${Y}_{i}={x}_{i*m+s}$

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

$\mathrm{size}=⌈\frac{n-s}{m}⌉$,

If averaging? is True, ${Y}_{i}=\frac{1}{m}\underset{k=0}{\overset{m-1}{\sum }}{x}_{i*m+s+k}$

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

$\mathrm{size}=⌊\frac{n-s}{m}⌋$,

where

• x is input array
• n is the number of elements in input array
• m is decimating factor
• s is start index
• size is the number of elements in the output sequence decimated array
• $⌈.⌉$ gives the smallest integer greater than or equal to the number
• $⌊.⌋$ gives the largest integer less than or equal to the number

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported