XLPack 6.1
Excel Worksheet Function Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ WZptsv2()

Function WZptsv2 ( 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 Hermitian positive definite tridiagonal matrix (complex numbers in pairs of cells)

Purpose
WZptsv2 computes the solution to a complex system of linear equations
A * X = B,
where A is an N x N Hermitian positive definite tridiagonal matrix, and X and B are N x Nrhs matrices.

A is factored as A = L*D*L^H, and the factored form of A is then used to solve the system of equations.

To represent complex numbers, a real part and an imaginary part are stored in a pair of adjacent cells (a real part in a left cell, and an imaginary part in a right cell). The computed results are stored in the same way.
Returns
N+1 x 2Nrhs
Column 1Column 2. . .Column 2Nrhs
Rows 1 to NSolution matrix X (a real part and an imaginary part are stored in a pair of adjacent columns (a real part is left and an imaginary part is right))
Row N+1Reciprocal condition numberReturn code. . .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]NNumber 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 x 2) Subdiagonal elements of the N x N coefficient matrix A.
[in]B(N x 2Nrhs) 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 an Hermitian positive definite tridiagonal matrix and
( 2.88 0.29-0.44i 0 )
A = ( 0.29+0.44i 0.62 -0.01-0.02i )
( 0 -0.01+0.02i 0.46 )
( 1.6236-0.7300i )
B = ( 0.1581+0.1537i )
( 0.1132-0.2290i )

WZptsv2