# Upsample (G Dataflow)

Inserts zeros in a sequence according to a specific upsampling factor.

## input array

A real vector.

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

## upsampling factor

Number of zeros between two adjacent samples.

This node inserts upsampling factor - 1 zeros into every two elements in input array. upsampling factor must be greater than zero.

Default: 1

Number of leading zeros in the output upsampled sequence.

leading zeros must be greater than or equal to zero and less than upsampling factor.

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

## upsampled array

Upsampled sequence.

The length of upsampled array is the upsampling factor times the length of input array.

## error out

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

## Algorithm for Upsampling

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

${Y}_{i}=\left\{\begin{array}{cc}{x}_{j}& \mathrm{if}\text{\hspace{0.17em}}i=j*m+k\\ 0& \mathrm{otherwise}\end{array}$

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

size = n * m,

where

• n is the number of elements in input array
• m is the upsampling factor