sábado, 19 de noviembre de 2016

Thomas Algorithmto to solve tridiagonal matrix (fortran and MATLAB)

Thomas algorithm offers an efficient algorithm to solve tridiagonal matrix. A tridiagonal matrix is generated when finite-difference equations are written in one dimension. This algorithm is executed in two major steps: Forward solution and Backward solution

The algorithm can be implemented as follows, in fortran or matlab:

Fortran
 MATLAB