Solves the symmetric positive definitive banded linear system Ax = b. |
||
Syntax |
x = LSolveSPDB(M, k, b) |
|
Arguments |
Name |
Description |
M |
Symmetric compressed diagonal storage matrix form of the banded square matrix A. Use SymBandMatrix to create it and SymBandMatrixIndices to populate it. |
|
k |
The number of super- or sub-diagonals in the lower or upper band of the original matrix. It should include off-diagonals with zero entries that are in between diagonals with non zero entries. |
|
b |
The right-hand side column vector or a matrix. If it is a matrix, each column is considered a separate vector and the system is solved separately for each column, resulting in multiple solutions. The number of columns must be equal to the row/column size of the square matrix A. |
|
Output |
Name |
Description |
x |
The solution(s) to the system(s). It will have the same dimensions as the right-hand side argument b. For each column in b, there will be a solution in the corresponding column in x. |
|
Example |
Solve symmetric banded linear system Ax=b. |
|
Syntax |
||
M = [40, 40, 40; 2, 4, 0]; |
||
|
ResultA matrix of the solution to the system. |
|
|
[Matrix] 3 x 2 |
|
Comments |
LSolveSPDB is based on dpbsv from the LAPACK library. |
|
See Also: |