Methods for Linear system solution with matlab <p>I have a linear system Ax = b , which is created by natural splines and looks like this: </p> <p><a href="https://i.stack.imgur.com/ElFVj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ElFVj.png" alt="enter image description here"></a></p> <p>where <a href="https://i.stack.imgur.com/bx0PX.gif" rel="nofollow noreferrer"> <img src="https://i.stack.imgur.com/bx0PX.gif" alt=" enter image description here"></a></p> <p>The code in matlab which is supposed to solve the system is the following: </p> <pre><code> clear; clc; x = [...] ; a = [...]; x0 = ...; n = length(x) - 1 ; for i = 0 : (n-1) h(i+1) = x(i+2) - x(i+1) ; end b= zeros( n+1 , 1 ) ; for i =2: n b(i,1) = 3 *(a(i+1)-a(i))/h(i) - 3/h(i-1)*(a(i) - a(i-1) ) ; end %linear system solution. l(1) =0 ; m(1) = 0 ; z(1) = 0 ; for i =1:(n-1) l(i+1) = 2*( x(i+2) - x(i) ) - h(i)* m(i) ; m(i+1) = h(i+1)/l(i+1); z(i+1) = ( b(i+1) - h(i)*z(i) ) / l ( i+1) ; end l(n+1) =1; z(n+1) = 0 ; c(n+1) = 0 ; for j = ( n-1) : (-1) : 0 c(j+1) = z(j+1) - m(j+1)*c(j+2) ; end </code></pre> <p>but I can't understand which method is being used for solving the linear system. If I had to guess I would say that the LU method is used, adjusted for tridiagonal matrices, but I still can't find the connection with the code...</p> <p>Any help would be appreciated!!!</p>