Version:

Last Modified: March 15, 2017

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

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 sequence.

This input accepts the following data types:

- Waveform
- Waveform in complex double-precision, floating-point numbers
- 1D array of waveforms
- 1D array of waveforms in complex double-precision, floating-point numbers
- 1D array of double-precision, floating-point numbers
- 2D array of double-precision, floating-point numbers
- 1D array of complex double-precision, floating-point numbers
- 2D array of complex double-precision, floating-point numbers

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 **signal** or less than or equal to zero, this node sets **decimated signal** to an empty array and returns an error.

**Default: **1

Index of the sample from which the node starts to decimate the input sequence. **start index** must be greater than or equal to zero.

This input is available only if you wire one of the following data types to **signal**:

- 1D array of double-precision, floating-point numbers
- 2D array of double-precision, floating-point numbers
- 1D array of complex double-precision, floating-point numbers
- 2D array of complex double-precision, floating-point numbers

This input changes to **start time** when the data type of **signal** is a waveform or a 1D array of waveforms.

**Default: **0

Time at which the node starts to decimate the input sequence.

This input is available only if you wire one of the following data types to **signal**:

- Waveform
- Waveform in complex double-precision, floating-point numbers
- 1D array of waveforms
- 1D array of waveforms in complex double-precision, floating-point numbers

This input changes to **start index** when the data type of **signal** is an array of numbers.

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Decimated sequence of the input sequence.

This output can return the following data types:

- Waveform
- Waveform in complex double-precision, floating-point numbers
- 1D array of waveforms
- 1D array of waveforms in complex double-precision, floating-point numbers
- 1D array of double-precision, floating-point numbers
- 2D array of double-precision, floating-point numbers
- 1D array of complex double-precision, floating-point numbers
- 2D array of complex double-precision, floating-point numbers

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

If *Y* represents the output sequence **decimated signal**, 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}=\lceil \frac{n-s}{m}\rceil $,

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}=\lfloor \frac{n-s}{m}\rfloor $,

where

*x*is**signal***n*is the number of elements in**signal***m*is**decimating factor***s*is**start index***size*is the number of elements in the output sequence**decimated signal**- $\lceil \mathrm{.}\rceil $ gives the smallest integer greater than or equal to the number
- $\lfloor \mathrm{.}\rfloor $ gives the largest integer less than or equal to the number

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: This product does not support FPGA devices