Table Of Contents

Build Array (Clock-Driven Logic)

Last Modified: September 10, 2016

Concatenates multiple arrays or appends elements to an n-dimensional array.

This node constructs the new array differently depending on the following conditions:

Condition Behavior Dimensionality of Output
Inputs all have the same dimension n+1
Inputs all have the same dimension and you select the Concatenate Inputs option n
Inputs have different dimensions n


Any n-dimensional array or scalar element. All inputs must be the same base type.

Behavior with Empty Array Inputs

If element is an empty array, this node produces an output array of dimension n+1 if the Concatenate Inputs option is not selected.

Different Sized Arrays

To build an array when one input contains fewer elements than another input, this node includes padding to match the size of the largest input. For example, if element is {1, 2} and element 2 is {3, 4, 5}, Build Array returns {{1, 2, 0}, {3, 4, 5}}. This node appends a 0 to the first input array. If you select Concatenate Inputs on the Item tab, this node returns {1, 2, 3, 4, 5} and does not include padding.


appended array

The resulting array.

Concatenating Elements

Select Concatenate Inputs in the Item tab to append all inputs in order, forming an output array of the same dimensionality as the array input wired. This option is not available for scalars.

Building Multidimensional Arrays

By default, Build Array appends all input elements in order, forming an array of one dimension higher than that of the input arrays. Each input constitutes a member of the nth dimension of the output array. For example, 1D array inputs become rows of the 2D array output. All inputs must be of the same dimension in order to use this option.

The following table demonstrates how Build Array appends inputs by default and with the Concatenate Inputs option selected.
Inputs Build Array Default Concatenate Inputs Comments
{1, 2} {3, 4} {{1, 2}, {3, 4}} {1, 2, 3, 4} Because both input arrays are of the same dimension, you can choose which configuration option to use.
{1, 2} {3, 4, 5} {{1, 2, 0}, {3, 4, 5}} {1, 2, 3, 4, 5} By default, this node appends an extra 0 of padding to the first input array in order to make it as long as the second input. No padding appears for the Concatenate Inputs option.
{1, 2} 3 N/A {1, 2, 3} If the inputs are of different dimensions, you must select the Concatenate Inputs option.
3 {1, 2} N/A {3, 1, 2} The Concatenate Inputs option returns the input elements in order, regardless of which has the highest dimension.

Where This Node Can Run:

Desktop OS: none

FPGA: All devices

Recently Viewed Topics