User`s guide
Linear Algebra
4-17
Example: LU Solver
In the model below, the LU Solver block solves the equation Ax = b, where
and finds x to be the vector
[-2 0 1]'.
To build the model, set the following parameters:
•In the DSP Constant block, set
Constant value = [1 -2 3;4 0 6;2 -1 3].
•In the DSP Constant1 block, set
Constant value = [1 -2 -1]'.
You can verify the solution by using the Matrix Multiply block to perform the
multiplication Ax, as shown in the model below.
Factoring Matrices
The Matrix Factorizations library provides the following blocks for factoring
various kinds of matrices:
•Cholesky Factorization
•LDL Factorization
•LU Factorization
A
12– 3
406
21– 3
= b
1
2–
1–
=