-3

I'm working on a project and i want to solve a system of tridiagonal matrix with9 equations with 9 unknowns in 20 steps. How do i go about the code using numpy\python.

Here is an example Tridiagonal Matrix

I am solving for x11, x12, x13, x21, x22, x23, x31, x32, x33 I haven't tried any code at all. I just started learning python. If i can get the code for the matrix above, i can be able to bring up the code for the project i'm working on.

1 Answers1

0

Step 1: perform the forward sweep to eliminate the sub-diagonal;

Step 2: perform back substitution to eliminate the super-diagonal.

This is the Thomas algorithm.