FEM_matrix = load ('./my_FEM_matrix.txt');

x = FEM_matrix(:,1);
y = FEM_matrix(:,2);
z = FEM_matrix(:,3);

stepwidth = 0.03; %in m
x_density = min(x) : stepwidth : max(x);
y_density = min(y) : stepwidth : max(y);

[XI, YI] = meshgrid (x_density, y_density);

ZI = griddata (x, y, z, XI, YI);

figure (1)
clf
contour (XI, YI, ZI, 50)

ylabel ('y-axis [m]')
xlabel ('x-axis [m])')

title ('FEM matrix')

axis tight

caxis([0 5])
hd = colorbar;
set (get (hd, 'title'), 'String', '[ radian ]');

% v = ver;
% print (sprintf ('Walter-%s.png', v(1).Name), '-dpng')
% print (sprintf ('Walter-%s.eps', v(1).Name), '-depsc')
