Skip to content

Python code for Tridiagonal Matrix Algorithm or Thomas Algorithm with n unknowns

License

Notifications You must be signed in to change notification settings

yahya-ansariii/TDMA-Solver-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDMA-solver

Python code for Tridiagonal Matrix Algorithm or Thomas Algorithm with n unknowns

Must refer nTDMA.pdf in the repository to get the general form used in the python code. All the variables used in python code are similar to the general form. User must input the data as per the general form. The python code has all the necessary comments to understand the tridiagonal matrix algorithm.

Click on the following link to checkout the video to easily use this python code.

Note : The TDMA or Thomas algorithm solves any kind of tridiagonal matrices. At the end of the code input() is used to hold the screen, just press enter to exit the code.

Motivation

To learn Python programming and use python packages.

Dependencies

Output

User input data :

input

Solution which is printed in tabular form :

table

If user input invalid option :

invalid

If user input y :

export to excel

If user input q :

quit without export

Note : The example showed in nTDMA.pdf was solved manually using the calculator and the appropriate formula by forward and back substitution.

License

Apache License 2.0

Author

Yahya Ansari