Solve a tridiagonal system of equations using the Thomas algorithm
Source:R/solve_diffusion_pde.R
solve_thomas.Rd
This function solves the system Ax = d, where A is an NxN tridiagonal matrix.
Arguments
- a
A numeric vector representing the sub-diagonal of A. Must have length N-1.
- b
A numeric vector representing the main diagonal of A. Must have length N.
- c
A numeric vector representing the super-diagonal of A. Must have length N-1.
- d
A numeric vector representing the right-hand side vector. Must have length N.