Engee documentation

Forward Substitution

Solving a system of linear equations with a lower triangular coefficient matrix.

blockType: ForwardSubstitution

Path in the library:

/Signal Operations/Math Functions/Matrices and Linear Algebra/Linear System Solvers/Forward Substitution

Description

Block Forward Substitution solves a system of linear equations by a simple direct substitution of variables, where:

  • — lower triangular coefficient matrix on at the entrance L;

  • — the matrix of free terms on at the entrance B;

  • — solving a system of equations, a matrix on the output is X.

The block does not check the rank of the input matrices. The block uses only elements below the main diagonal of the matrix and ignores the elements above. If the option is set Input L is upper triangular matrix, then the block assumes that the elements on the diagonal equal 1. This is useful when the matrix It is the result of another operation, such as LDL decomposition, which uses diagonal elements to represent the matrix. .

Ports

Input

# L — the lower triangular matrix of coefficients
matrix M by M

Details

The input lower triangular matrix in the equation , given as a matrix of size on . The Inputs L and B must have the same number of lines.

Data types

Float32, Float64, Int8, Int16, Int32

Complex numbers support

Yes

# B — the matrix of free terms
matrix M by N | vector M by 1

Details

The Matrix in the equation , given as a matrix of size on or a vector of size on .

If a vector is given on , then the block processes the input vector of length on port B as a matrix on . The Inputs L and B must have the same number of lines.

Data types

Float32, Float64, Int8, Int16, Int32

Complex numbers support

I don’t

Output

# X — solving a system of equations
matrix M by N | vector M by 1

Details

The solution of the system of equations returned in the form of a matrix on or vectors on . The size of the output matrix X is the same as the size of the input matrix B.

Data types

Float64

Complex numbers support

Yes

Parameters

Main

# Input L is upper triangular matrix — the diagonal elements of the input matrix have the value 1
Logical

Details

Check this box only if all the elements on the diagonal of the input L have the value 1. At the same time, the block optimizes its behavior by skipping an unnecessary division operation.

Do not check this box if any elements on the diagonal of the input L are not equal. 1. When you uncheck the box Input L is upper triangular matrix a block always performs a division operation.

Default value

false (switched off)

Program usage name

InputLIsUnitLowerTriangular

Tunable

No

Evaluatable

No

# Diagonal of complex input L is real — The diagonal elements of the complex input are real
Logical

Details

Select this option to optimize the simulation speed when the diagonal elements of the complex input L are real.

Dependencies

To use this option, uncheck the box. Input L is upper triangular matrix.

Default value

false (switched off)

Program usage name

DiagonalOfComplexInputLIsReal

Tunable

No

Evaluatable

No