clear;
A = zeros(17);

for i = 1:17
    A(i,i) = 2;
end


A(2, 1) = -1;
A(2, 3) = -1;
A(16, 17) = -1;
A(16, 15) = -1;
for i = 4:15
    A(i, i-1) = -1;
    A(i, i+1) = -1;
end

A(1, 2) = -1;
A(17, 16) = -1;

ka = 0.048;
kb = 0.69;

A(3, 3) = 1/ka + 1/kb;
A(3, 2) = -1/ka;
A(3, 4) = -1/kb;

A(15, 15) = 1/ka + 1/kb;
A(15, 14) = -1/kb;
A(15, 16) = -1/ka;

b = zeros(17, 1);
b(1) = 150;
b(17) = 10;

s = inv(A) * b;

plot(s)
%%
