Array 2D
The Array 2D node declares one or more 2D arrays that you can access using form objects and methods. In the figure below, the 2D double array xycoords is declared.
Initial Values
The default (or initial) value can be a 2D array of arbitrary size. To edit the initial values, click the Edit Initial Values button below the List of Variables. This opens a dialog where the value of each component can be entered. See the figure below for an example of a 2D array of doubles.
Array Syntax
The table below shows a few examples of 2D arrays:
For 2D arrays, rows correspond to the first index so that {{1,2,3},{4,5,6}} is equivalent to the matrix:
1 2 3
4 5 6
Assuming that the above 2-by-3 matrix is stored in the 2D array variable arr, then the element arr[1][0] equals 4.
To interactively define the Initial values of a 2D array, select the Undefined option for the Number of columns. The Edit Initial Values button opens a dialog where the number of rows and columns can be interactively changed, as shown in the figure below.