%% plot ITD + natural frequencies
l = 0.25;   % [m]
sizeMS = size(MS);

% degrees of freedom / number of sensors
n = sizeMS(1,1);

% length of 1 part of support
p = l/n;

% x points
for i = 1:n
    x(i) = i*p;
end

figure()
subplot(2,2,1)
hold on;
grid on;
plot([fliplr(x), 0], zeros(n+1),'--ks','LineWidth',1,...
                                'MarkerEdgeColor','k',...
                                'MarkerFaceColor','w')
                                
plot([fliplr(x), 0], [MS(:, 10)',0],'--ks','LineWidth',1,...
                                       'MarkerEdgeColor','k',...
                                       'MarkerFaceColor','g')
                                       

axis('tight')
xlabel('l [m]')
ylabel('\psi [-]')
title(sprintf('1st mode shape, f_1 = %.3f Hz', f(1,1)))


subplot(2,2,2)
hold on;
grid on;
plot([fliplr(x), 0], zeros(n+1),'--ks','LineWidth',1,...
                                'MarkerEdgeColor','k',...
                                'MarkerFaceColor','w')
plot([fliplr(x), 0], [MS(:, 8)',0],'--ks','LineWidth',1,...
                                       'MarkerEdgeColor','k',...
                                       'MarkerFaceColor','g')
axis('tight')
xlabel('l [m]')
ylabel('\psi [-]')
title(sprintf('2nd mode shape, f_2 = %.3f Hz', f(1,2)))

subplot(2,2,3)
hold on;
grid on;
plot([fliplr(x), 0], zeros(n+1),'--ks','LineWidth',1,...
                                'MarkerEdgeColor','k',...
                                'MarkerFaceColor','w')
plot([fliplr(x), 0], [MS(:, 6)',0],'--ks','LineWidth',1,...
                                       'MarkerEdgeColor','k',...
                                       'MarkerFaceColor','g')
axis('tight')
xlabel('l [m]')
ylabel('\psi [-]')
title(sprintf('3rd mode shape, f_3 = %.3f Hz', f(1,3)))

subplot(2,2,4)
hold on;
grid on;
plot([fliplr(x), 0], zeros(n+1),'--ks','LineWidth',1,...
                                'MarkerEdgeColor','k',...
                                'MarkerFaceColor','w')
plot([fliplr(x), 0], [MS(:, 4)',0],'--ks','LineWidth',1,...
                                       'MarkerEdgeColor','k',...
                                       'MarkerFaceColor','g')
axis('tight')
xlabel('l [m]')
ylabel('\psi [-]')
title(sprintf('4th mode shape, f_4 = %.3f Hz', f(1,4)))