% Create Kirchhoff matrix and response matrix for stick figure matrix.
%
%   5    1    2
%    \   |   /
%    10--6--7         1 ~ 5  Boundary nodes
%     |     |         6 ~ 10 Interior nodes
%     9-----8
%    /       \
%   4         3
%

p = prime(10);

K = zeros(10,10);

for i = 1:10
    if i <= 5
        K(i,i+5) = -p(i);
    elseif i <= 9
        K(i,i+1) = -p(i);
    else
        K(6,10) = -p(10);
    end
end

K = K + K';
for i = 1:10
    K(i,i) = -sum(K(i,:));
end

L = getL(K,5);