Owning Palette: Matrix Functions
Requires: Base Development System
Returns the elements of matrix at row and column.
The row and column inputs specify row and column indexes. If you wire scalar data to row and column, for example i for row and j for column, the function returns a scalar that contains the element at location (i, j).
The connector pane displays the default data types for this polymorphic function.
Add to the block diagram | Find on the palette |
Add additional row and column inputs and element outputs by resizing the node.
If matrix is an empty matrix or array, element returns an invalid operation value at each exterior location.
If you do not wire row and column, element returns a column vector with the first column of matrix.
If you do not wire column and you wire a numeric scalar to row, element returns a row vector with the index of row. If you do not wire row and you wire a numeric scalar to column, element returns a column vector with the index of column.
If you wire a 1D array of indexes to either row or column and no value to the other index input, element returns a matrix.
If you wire a 1D array of numeric data to row or column, the function returns one matrix element for every location specified. These locations are determined by pairing each row index in row with each column index in column. For example, passing the array of integers {1, 2, 4} to row and the integer {5} to column retrieves matrix elements at indexes (1, 5), (2, 5), and (4, 5). In this case, the output is a row vector, or a 3 x 1 matrix, because the number of scalar elements wired to row is 3 and the number of scalars elements wired to column is 1.
If you wire an empty 1D array to row or column, element returns an empty matrix or array with 0 in the corresponding row or column dimension.
If you wire a negative value to row or column, the function returns an invalid operation value at each exterior location.
If you wire a value to row or column that is greater than the row or column dimension of matrix, the function returns an invalid operation value at each exterior location.