As much as I hate the suggestion, you could trivially use inv. ;-)
Better would be to use sparse matrices. That is, learn to use them.
Better yet? Learn to factorize your matrix, and then how to work with those factors. Or learn to use linsolve.
You don't tell us the value of h or N. So I'll be arbitrary
N = 6;
h = 2;
a=3*h-2;
b=1;
c=1;
A=spdiags([a*ones(N,1), b*ones(N,1), c*ones(N,1)],[0 1 -1],N,N);
A is a sparse matrix, best if n is at all large.
full(A)
Now you could trivially use inv, as I said.
full(inv(A))
But do you see that the inverse of a tridiagonal matrix is no longer tridiagonal? You don't want to do that.
Instead, you might use tools like linsolve. Or you could factorize A. A cholesky factorization seeems a good choice.
L = chol(A)
As you can see, L is now bidiagonal.
spy(L)
Or you could use linsolve. Since you are doing this to solve a linear system of equations, that would be appropriate. Or you could use backslash.