N = 60;
Tsl = 150;
Tsr = 10;

A = zeros(N, N);

A(1, 1) = -2;
A(2, 1) = 1;
A(N, N) = -2;
A(N-1, N) = 1;

for i =2:N-1
    A(i, i) = -2;
    A(i-1, i) = 1;
    A(i+1, i) = 1;
end

C = zeros(N);
C(1) = -Tsl;
C(N) = -Tsr;

x=inv(A) * C;
plot(x(:,1))
scatter(x(:, 1))