    close all
    clear all

    h = 3100;   %Depth
    s = [1.2 1.25 1.3]';    %Scope
    x = (s-1)*h/2;

    d = 0:100:1400;  %Distance off bottom of bottom of Catenary.


    FishBiteCableWeight = .310;  %kg/m
    NonFishBiteCableWeight = .16;  %kg/m

    NonFishBiteCableCost = 69;
    FishBiteCableCost = NonFishBiteCableCost+12.5;
    
    for i = 1:length(s)
    for j = 1:length(d)
    MetersofNonFishBite(i,j) = x(i)+d(j);
    MetersofFishBite(i,j) = h*s(i)-MetersofNonFishBite(i,j);
    FloatedFishBite(i,j) = x(i);
    end
    end


TotalFloatedWeight = MetersofNonFishBite*NonFishBiteCableWeight+FloatedFishBite*FishBiteCableWeight;
TotalFloatedWeight = TotalFloatedWeight*2.2;

TotalCableWetWeight = MetersofNonFishBite*NonFishBiteCableWeight+MetersofFishBite*FishBiteCableWeight;
TotalCableWetWeight = TotalCableWetWeight*2.2;
                      

BuoyLoad = (FishBiteCableWeight*(MetersofFishBite-FloatedFishBite))*2.2;
NetTermFloatation = (MetersofNonFishBite*NonFishBiteCableWeight+MetersofFishBite*FishBiteCableWeight/2)*2.2-TotalFloatedWeight;


figure('PaperPositionMode','manual','PaperType','tabloid','PaperPosition',[0 0 11 17]);
subplot(5,1,1)
plot(d,TotalFloatedWeight)
legend('Scope = 1.2','Scope = 1.25','Scope = 1.3',2);
xlabel('Meters');
ylabel('lbs');
title(['Cable Floatation Required:   FB Cable = ',num2str(1000*FishBiteCableWeight),' kg/km        Non-FB Cable = ',num2str(1000*NonFishBiteCableWeight),' kg/km']);

subplot(5,1,2)
plot(d,BuoyLoad)
legend('Scope = 1.2','Scope = 1.25','Scope = 1.3');
xlabel('Meters');
ylabel('lbs');
title('Static Buoy Load');

subplot(5,1,3)
plot(d,NetTermFloatation)
legend('Scope = 1.2','Scope = 1.25','Scope = 1.3');
xlabel('Meters');
ylabel('lbs');
title('Termination Floatation Requirements (Net)');

subplot(5,1,4)
plot(d,MetersofNonFishBite)
legend('Scope = 1.2','Scope = 1.25','Scope = 1.3');
hold on
plot(d,MetersofFishBite)
xlabel('Distance from bottom to bottom of catenary (m)');
ylabel('Meters');
title('Cable lengths:  Fish-Bite (upper), Non-FishBite (lower)');

subplot(5,1,5)
plot(d,MetersofNonFishBite*NonFishBiteCableCost/1000+MetersofFishBite*FishBiteCableCost/1000)
legend('Scope = 1.2','Scope = 1.25','Scope = 1.3');
xlabel('Distance from bottom to bottom of catenary (m)');
ylabel('Thousands of dollars');
title(['Total Cable Cost Fish-Bite ($',num2str(FishBiteCableCost),'/m), Non-FishBite ($',num2str(NonFishBiteCableCost),'/m)']);


print -depsc2 'FloatationRequirements'