|
8 | 8 | % See also inv, gaussian_elimination. |
9 | 9 | % |
10 | 10 | % Copyright © 2021 Tamas Kis |
| 11 | +% Last Update: 2021-08-28 |
| 12 | +% Website: https://tamaskis.github.io |
11 | 13 | |
12 | | -% Last Update: 2021-07-09 |
13 | 14 | % |
14 | | -%-------------------------------------------------------------------------- |
15 | | -% |
16 | | -% MATLAB Central File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/85438-tridiagonal-matrix-algorithm-thomas-alg-tridiagonal |
17 | | -% GitHub: https://github.com/tamaskis/tridiagonal-MATLAB |
| 15 | +% TECHNICAL DOCUMENTATION: |
| 16 | +% https://tamaskis.github.io/documentation/Tridiagonal_Matrix_Algorithm__Thomas_Algorithm_.pdf |
18 | 17 | % |
19 | | -% See EXAMPLES.mlx for examples and "DOCUMENTATION.pdf" for additional |
20 | | -% documentation. Both of these files are included with the download. |
| 18 | +% REFERENCES: |
| 19 | +% [1] MATH 2620 Course Reader (Vanderbilt University) |
| 20 | +% [2] https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm |
| 21 | +% [3] https://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-_TDMA_(Thomas_algorithm) |
21 | 22 | % |
22 | 23 | %-------------------------------------------------------------------------- |
23 | 24 | % |
24 | 25 | % ------ |
25 | 26 | % INPUT: |
26 | 27 | % ------ |
27 | | -% A - (n×n) tridiagonal matrix |
28 | | -% d - (n×1) vector |
| 28 | +% A - (n×n double) tridiagonal matrix |
| 29 | +% d - (n×1 double) vector |
29 | 30 | % |
30 | 31 | % ------- |
31 | 32 | % OUTPUT: |
32 | 33 | % ------- |
33 | | -% x - (n×1) solution of the tridiagonal linear system Ax=d |
| 34 | +% x - (n×1 double) solution of the tridiagonal linear system Ax=d |
34 | 35 | % |
35 | 36 | %========================================================================== |
36 | 37 | function x = tridiagonal(A,d) |
|
0 commit comments