dx = 0.1
L = 1

%

x = 0:dx:L

%

A = zeros(length(x)-2);
A = A + diag(-2 * ones(1, length(A)));
A = A + diag(ones(1, length(A) - 1), 1);
A = A + diag(ones(1, length(A) - 1), -1)

%

C = -1.96e-7 * ones(length(A), 1);
C(1) = C(1) - 20;
C(end) = C(end) - 30

%

T = A \ C