Engee documentation

Extract Triangular Matrix

Selection of the upper or lower triangular matrix.

extract triangular matrix

Description

Block Extract Triangular Matrix creates a triangular matrix of elements above or below the main diagonal of the input matrix by . The block processes a vector input signal of length as a matrix by 1.

The figure shows the extraction of upper and lower triangular matrices from the input matrix 5 by 3.

extract triangular matrix 1

Ports

Input

A - input matrix
vector | matrix

Initial matrix.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Output

U - output upper triangular matrix
matrix

Output upper triangular matrix. The first row of the output matrix is identical to the first row of the input matrix. The elements below the main diagonal of the output matrix are zero.

Dependencies

To use this port, set the Extract parameters to Upper.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

L - output lower triangular matrix
matrix

Output lower triangular matrix. The first column of the output matrix is identical to the first column of the input matrix. The elements above the main diagonal of the output matrix are zero.

Dependencies

To use this port, set the Extract parameters to Lower.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Parameters

Extract - output matrix type
Upper (by default) | Lower

Part of the matrix to extract: upper or lower.

  • Upper - copies elements on the main diagonal of the input matrix and above it to the output matrix of the same size. Thus, the first row of the output matrix is identical to the first row of the input matrix. The elements below the main diagonal of the output matrix are equal to zero.

  • Lower - copies the elements on and below the main diagonal of the input matrix into the output matrix of the same size. Thus, the first column of the output matrix is identical to the first column of the input matrix. The elements above the main diagonal of the output matrix are equal to zero.