Skip to main content

SetTriDiag

SetTriDiag routine can be used for setting the three diagonals (main, sub diagonal, superdiagonal) of a square dense matrix.

The generic call is given below.

CALL SetTriDiag( mat, d, da, db)

where,

  • mat(:,:) is a square matrix of Real(DFP)
  • d(:) is a vector of Real32 | Real64 | Int8 | Int16 | Int32 | Int64, and it stands for main diagonal
  • If size of d is 1, then it means the diagonal values are constant, otherwise the size of d should be same as the main diagonal of matrix mat.
  • da(:) is a vector ofReal32 | Real64 | Int8 | Int16 | Int32 | Int64`, and it stands for first superdiagonal. Its size should be (n-1).
  • db(:) is a vector ofReal32 | Real64 | Int8 | Int16 | Int32 | Int64`, and it stands for first subdiagonal. Its size should be (n-1).