Jump to content

Initialize Array function: Difference between revisions

From LabVIEW Wiki
Add new page (stub)
 
Update and clarify contents
Line 1: Line 1:
{{stub}}
[[File:Initialize Array - Terminals.png|thumb|Initialize Array function]]
[[File:Initialize Array - Terminals.png|thumb|Initialize Array function]]


Creates an n-dimensional array in which each element is initialized to the specified value. This node accepts any data type and can be resized to the desired number of dimensions (max. 1997).
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function}}


{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function}}
The '''Initialize Array''' function creates an array in which each element is initialized to the specified value.


== Usage ==
== Usage ==


== Best practice ==
Connect an element of any data type to the '''element''' input terminal and specify the desired dimension size at '''dimension size 0'''. This creates a new array with the specified number of elements, in which each element is initialized to the specified value.
 
[[File:Initialize Array - Create Array From Element.png]]
 
Create multidimensional arrays by dragging the upper or lower side of the node. The node can be resized for up to 1997 dimensions.


== History ==
[[File:Initialize Array - Create Multidimensional Array.png]]


== See also ==
== Best practice ==


== External links ==
* For large data sets, use the '''Initialize Array''' function to reserve memory and [[Replace Array Subset function|Replace Array Subset]] to replace elements.


[[Category:Array Palette]]
[[Category:Array Palette]]

Revision as of 16:28, 6 September 2019

Initialize Array function
Object information
Owning palette(s) Array palette
Type Function
Requires Basic Development Environment

The Initialize Array function creates an array in which each element is initialized to the specified value.

Usage

Connect an element of any data type to the element input terminal and specify the desired dimension size at dimension size 0. This creates a new array with the specified number of elements, in which each element is initialized to the specified value.

Create multidimensional arrays by dragging the upper or lower side of the node. The node can be resized for up to 1997 dimensions.

Best practice

  • For large data sets, use the Initialize Array function to reserve memory and Replace Array Subset to replace elements.