User`s guide

Extract Triangular Matrix
5-171
5Extract Triangular Matrix
Purpose Extract the lower or upper triangle from an input matrix.
Library Math Functions / Matrices and Linear Algebra / Matrix Operations
Description The Extract Triangular Matrix block creates a triangular matrix output from
the upper or lower triangular elements of an M-by-N input matrix. A length-M
1-D vector input is treated as an M-by-1 matrix.
The
Extract parameter selects between the two components of the input:
Upper – Copies the elements on and above the main diagonal of the input
matrix to an output matrix of the same size. The first row of the output
matrix is therefore identical to the first row of the input matrix. The
elements below the main diagonal of the output matrix are zero.
Lower – Copies the elements on and below the main diagonal of the input
matrix to an output matrix of the same size. The first column of the output
matrix is therefore identical to the first column of the input matrix. The
elements above the main diagonal of the output matrix are zero.
The output has the same frame status as the input.
Example The example below shows the extraction of upper and lower triangles from a
5-by-3 input matrix.
123
456
789
10 11 12
13 14 15
123
056
009
000
000
123
456
789
10 11 12
13 14 15
100
450
789
10 11 12
13 14 15