HyperMath

LSolveSPDB

LSolveSPDB

Previous topic Next topic No expanding text in this topic  

LSolveSPDB

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

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];
k = 1;
b = [1, 1; 11, 11; 21, 21];
x = LSolveSPDB(M, k, b);
print("LSolveSPDB\:\n", x);
 
LSolveSPDB:
[Matrix] 3 x 2
0.013797 0.013797
0.22405 0.22405
0.50259 0.50259

 

Result

A matrix of the solution to the system.

 

[Matrix] 3 x 2
0.013797 0.013797
0.22405  0.22405
0.50259  0.50259

Comments

LSolveSPDB is based on dpbsv from the LAPACK library.

See Also:

SymBandMatrix

SymBandMatrixIndices

LSolve

LSolveB

LSolveT