Build Matrix Function

Owning Palette: Matrix Functions

Requires: Base Development System

Appends elements to a matrix by rows or columns.

You also can use the Set Matrix Elements and Set Submatrix functions to modify an existing matrix.

The connector pane displays the default data types for this polymorphic function.

Details  

 Add to the block diagram  Find on the palette
matrix or element can be a numeric scalar, a real or complex matrix, or a 1D or 2D array of any numeric type.
appended matrix is the resulting matrix.

Build Matrix Details

When you add the function to the block diagram, it has only one input available. Add inputs to the node by right-clicking an input and selecting Add Input from the shortcut menu or by resizing the node.

The Build Matrix function operates in one of two different modes: Append by Rows or Append by Columns. When you add the function to the block diagram, the default mode is Append by Columns.

If you right-click the function and select Build Matrix Mode»Append by Rows, the function adds each new element or matrix to the last row starting in the first column. If you right-click the function and select Build Matrix Mode»Append by Columns, the function adds each new element or matrix to the last column starting in the first row.

If the inputs you wire to the Build Matrix function have different dimensions, LabVIEW creates appended matrix by padding the smaller input with the scalar default value.

Wiring Empty Input Values

If element is an empty matrix or array, the function ignores the empty dimensions. However, the dimensions and data type of element affect the dimensions and data type of appended matrix.

Wiring Different Numeric Types

If you wire inputs of different numeric types to the Build Matrix function, appended matrix stores all inputs without losing precision.