# Load data:
# 1. Geometric data
load EiffelPoints; X=Expression1;
load EiffelLines; L=Expression1;
# 2. Stiffness data
load K;

# Extract model parameters
[NX,ndims]=size(X);  # number of points, space dimension
[NL,nseg]=size(L);   # number of lines, nr. of line segments
m=ndims*NX;              # total number of unknowns, i.e., nr. of points times n. of dimensions

# Draw model points
drawXu(X,zeros(m,1),L,20); axis 'equal'; title("Eiffel Tower");

# Investigate singular values
k = 50;
s = svds(K,k);    # most significant  singular values
figure(2)
plot(log10(s)); title("Singular values of model"); xlabel("index");
ylabel("log10(sigma)");

n=32; [U S V] = svds(K,n);
