close all


%Set up figures
figure(1)
grid on
hold on

figure(2)
grid on
hold on
xlabel('Current Speed (cm/s)');
ylabel('Cable Angle from Vertical (degrees)');
title('Slope of MOOS Test Mooring vs Current Speed');
text(80,5.5,'depth = 20 m','EdgeColor','black','BackgroundColor','white','FontSize',8,'HorizontalAlignment','left');
text(80,13.1,'depth = 200 m','EdgeColor','black','BackgroundColor','white','FontSize',8,'HorizontalAlignment','left');
text(80,21.1,'depth = 400 m','EdgeColor','black','BackgroundColor','white','FontSize',8,'HorizontalAlignment','left');
text(80,29,'depth = 600 m','EdgeColor','black','BackgroundColor','white','FontSize',8,'HorizontalAlignment','left');

figure(1)
text(750,-1100,' \leftarrow Current = 80 cm/s','BackgroundColor','white');

for current = 0.8: -0.025: 0.075
     
matfilenm = ['MOOS-Mooring-',num2str(current),'.mat']; 

load(matfilenm)

figure(1)
plot(x,z-depth);

figure(2)
plot(100*current,phi(240)*180/pi,'-bo','MarkerSize',2);
plot(100*current,phi(220)*180/pi,'-bo','MarkerSize',2);
plot(100*current,phi(200)*180/pi,'-bo','MarkerSize',2);
plot(100*current,phi(180)*180/pi,'-bo','MarkerSize',2);


end


%Resize and print config figure
figure(1)
axis image
tmp = axis;
tmp(1) = tmp(1) -100;
tmp(2) = tmp(2) + 100;
axis (tmp);
xlabel('meters');
ylabel('meters');
title('Configuration of MOOS Test Mooring in Various Currents');
text(300,-500,'Current = 7.5 cm/s \rightarrow','BackgroundColor','white');
text(400,-1700,'2.5 cm/s Current Increments','EdgeColor','black','BackgroundColor','white');
print -dpsc2 config
print -dpng config

figure(2)
print -dpsc2 slopes
print -dpng slopes













































