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.
To learn Python programming and use python packages.
User input data :
Solution which is printed in tabular form :
If user input invalid option :
If user input y :
If user input q :
Note : The example showed in nTDMA.pdf was solved manually using the calculator and the appropriate formula by forward and back substitution.