Solve triangular band system

STBSV/DTBSV/CTBSV/ZTBSV

Error conditions are:

 

uplo ≠ ’L’ or ’l’ or ’U’ or ’u’

 

trans ≠ ’N’ or ’n’ or ’T’ or ’t’ or ’C’ or ’c’

 

diag ≠ ’N’ or ’n’ or ’U’ or ’u’

 

n < 0

 

kd < 0

 

ldab < kd+1

 

incx = 0

 

Actual character arguments in a subroutine call can be longer than the corresponding dummy arguments. Therefore, readability of the CALL statement may be improved by coding the trans argument as ’NORMAL’ or ’NONTRANS’ for ’N’, ’TRANSPOSE’ for ’T’, or ’CTRANS’ for ’C’. Refer to “Example 2.”

Example 1 Perform REAL*4 forward elimination using the 75-by-75 unit-diagonal lower-triangular real band matrix with bandwidth 15 that is stored in an array AB whose dimensions are 25-by-100, and x is a real vector 75 elements long stored in an array X of dimension 100.

CHARACTER*1 UPLO,TRANS,DIAG

INTEGER*4 N,KD,LDAB,INCX

REAL*4 AB(25,100),X(100)

UPLO = ’L’

TRANS = ’N’

DIAG = ’U’

N = 75

KD = 15

LDAB = 25

INCX = 1

CALL STBSV (UPLO,TRANS,DIAG,N,KD,AB,LDAB,X,INCX)

Example 2 Perform REAL*4 back substitution using the 75-by-75 nonunit-diagonal, upper-triangular real band matrix with bandwidth 15 that is stored in an array AB whose dimensions are 25-by-100, and x is a real vector 75 elements long stored in an array X of dimension 100.

INTEGER*4 N,KD,LDAB

REAL*4

AB(25,100),X(100)

N = 75

 

KD =

15

 

LDAB

= 25

 

CALL

STBSV (’UPPER’,’NONTRANS’,’NONUNIT’,N,KD,AB,LDAB,X,1)

Chapter 3 Basic Matrix Operations 307