Solving a tridiagonal matrix in matlab using Thomas algorithm

195 Views Asked by At

Hello I have this tridiagonal matrix. enter image description here

where $$r = \frac1x , g= \frac{1}{ x^2 } , s= \frac{\ln x}{ x^2 } $$ and n represents the size. I'm trying to solve this matrix in Matlab using the Thomas algorithm. I have found some online resources however they dont tend to deal with when n becomes very large.
Sorry for this vague description, I'm quite new to using matlab.