function [Elongation,ElongationRate] = ComputeElongation(Buoy, p_aB, Plate, p_aP)



t = get(Buoy,'t');

Elongation = zeros(length(t),1);


xoB = get(Buoy,'x0');
xoF = get(Plate,'x0');

%Get Buoy motion results
x = get(Buoy,'x');
xdot = get(Buoy,'xdot');
xddot = get(Buoy,'xddot');
 
%Get Plate motion results
y = get(Plate,'x');
ydot = get(Plate,'xdot');
yddot = get(Plate,'xddot');

Elongation = zeros(length(t),1);
ElongationRate = zeros(length(t),1);

for i = 1:length(t)
    [Elongation(i),ElongationRate(i),s(i,:)] = TetherElongations(xoB,x(i,:)',xdot(i,:)',p_aB,xoF,y(i,:)',ydot(i,:)',p_aP);
end
end

