A=[-2 1 0;1 -2 1; 0 1 -2];
b=[0 0 -1];
V=inv(A)*b'
V=[0; V; 1]
d=linspace(0,0.2,length(V))
plot(d,V)
xlabel('Distance (in cm)')
ylabel('Voltage (in volt)')
grid on