|
|
◆ WDptsv()
| Function WDptsv |
( |
N As |
Long, |
|
|
D As |
Variant, |
|
|
E As |
Variant, |
|
|
B As |
Variant, |
|
|
Optional Nrhs As |
Long = 1 |
|
) |
| |
Solution to system of linear equations AX = B for a symmetric positive definite tridiagonal matrix
- Purpose
- WDptsv computes the solution to a real system of linear equations where A is an N x N symmetric positive definite tridiagonal matrix, and X and B are N x Nrhs matrices.
A is factored as A = L*D*L^T, and the factored form of A is then used to solve the system of equations.
- Returns
- N+2 x Nrhs
| Column 1 | Column 2 | . . . | Column Nrhs |
| Rows 1 to N | Solution matrix X |
| Row N+1 | Reciprocal condition number | 0 | . . . | 0 |
| Row N+2 | Return code | 0 | . . . | 0 |
Return code.
= 0: Successful exit.
= i > 0: The leading minor of order i of A is not positive definite, so the factorization could not be completed, and the solution has not been computed.
- Parameters
-
| [in] | N | Number of linear equations, i.e., order of the matrix A. (N >= 1) |
| [in] | D | (N) Diagonal elements of the N x N coefficient matrix A. |
| [in] | E | (N-1) Subdiagonal elements of the N x N coefficient matrix A. |
| [in] | B | (N x Nrhs) N x Nrhs right hand side matrix B. |
| [in] | Nrhs | (Optional)
Number of columns of right hand side matrix B. (Nrhs >= 1) (default = 1) |
- Reference
- LAPACK
- Example
- Solve the system of linear equations Ax = B and estimate the reciprocal of the condition number (RCond) of A, where A is symmetric positive definite tridiagonal matrix and
( 2.58 -0.99 0 ) ( -1.1850 )
A = ( -0.99 0.69 -0.03 ), B = ( 0.1410 )
( 0 -0.03 0.18 ) ( 0.1614 )
|