Home > Software engineering >  Strives for the code
Strives for the code

Time:11-30

How to input specific tridiagonal matrix? And the solution is use the chase?

CodePudding user response:

For your reference
https://blog.csdn.net/u010450214/article/details/50170623

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

Sub TRIDAG (a, b, c, R (), X (), n)
Nmax=100
If a=0 # Then Exit Sub


X (1)=(R (1) - b * X (2))/a
For j=2 To n - 1

X (j)=(R (j) - c (j + 1) - b * * X X (j - 1))/a
Next j
If j=n Then
X (j)=(R (j) - b * X (j - 1))/a
End the If
For j=n - 1 To 1 Step - 1
X (j)=(R (j) - c (j + 1) - b * * X X (j - 1))/a
Next j


End Sub
  • Related