# Pattern Generator (Impulse) (G Dataflow)

Version:

Generates a signal containing an impulse pattern.

## amplitude

Amplitude of the pattern.

Default: 1

## delay

Index within the pattern at which the impulse occurs. This input must be greater than or equal to 0. If this input is less than 0 or greater than or equal to the number of samples, this node sets the output pattern to 0 and returns an error.

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

## samples

Number of samples in the pattern. This input must be greater than delay. If this input is negative or zero, the node sets the output pattern to an empty array and returns an error.

Default: 128

## impulse pattern

Output impulse pattern.

## error out

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

## Algorithm for Generating the Impulse Pattern

If the sequence X represents the impulse pattern, this node generates the pattern according to the following equation:

${x}_{i}=\left\{\begin{array}{cc}A& \text{if}i=d\\ 0& \text{elsewhere}\end{array}$

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

where

• A is the amplitude
• d is the delay
• n is the number of samples

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported