%clear all 
%close all

filename = '../BuoyA5';

%Read WAMIT FD Coefficients
FDcoefs = ReadWamitFD(filename);

%Pull out infinite frequence added mass and dimensionalize for convenience
rho = 1025;
muinf = NaN(6,6);
for i = 1:6
 for j = 1:6
  muinf(i,j) = rho*FDcoefs.X{i,j}(2);
 end
end

%Compute IRF from WAMIT IRF results
[L tau] =  ReadWamitIRF(filename);

figure
plot(tau,L{1,1})
hold all
plot(tau,L{3,3})
legend('Surge/Sway','Heave');
grid on
title('IRF');

