function FD_coefs =  ReadWamitFD(filenm)

filenm1 = '.1';filenm1 = strcat(filenm,filenm1);
filenm3 = '.3';filenm3 = strcat(filenm,filenm3);

s1 = load(filenm1);
N = length(s1(:,1));

s2 = load(filenm3);
N2 = length(s2(:,1));

for i = 1:10:N-9;
    
    k = i-1;
    k=k/10 +1;
    tps(k,1) = s1(i,1);     %time period in seconds
    add(k,1) = s1(i,4);     %added mass coefficient
    dam(k,1) = s1(i,5);     %damping coefficient
end
for i = 2:10:N-8;
    
    k = i-2;
    k=k/10 +1;
    
    add(k,2) = s1(i,4);
    dam(k,2) = s1(i,5);
end
for i = 3:10:N-7;

    k = i-3;
    k=k/10 +1;
    
    add(k,3) = s1(i,4);
    dam(k,3) = s1(i,5);
end
for i = 4:10:N-6;

    k = i-4;
    k=k/10 +1;
    
    add(k,4) = s1(i,4);
    dam(k,4) = s1(i,5);
end
for i = 5:10:N-5;

    k = i-5;
    k=k/10 +1;
    
    add(k,5) = s1(i,4);
    dam(k,5) = s1(i,5);
end
for i = 6:10:N-4;

    k = i-6;
    k=k/10 +1;
    
    add(k,6) = s1(i,4);
    dam(k,6) = s1(i,5);
end
for i = 7:10:N-3;

    k = i-7;
    k=k/10 +1;
    
    add(k,7) = s1(i,4);
    dam(k,7) = s1(i,5);
end
for i = 8:10:N-2;

    k = i-8;
    k=k/10 +1;
    
    add(k,8) = s1(i,4);
    dam(k,8) = s1(i,5);
end
for i = 9:10:N-1;

    k = i-9;
    k=k/10 +1;
    
    add(k,9) = s1(i,4);
    dam(k,9) = s1(i,5);
end
for i = 10:10:N;

    k = i-10;
    k=k/10 +1;
    
    add(k,10) = s1(i,4);
    dam(k,10) = s1(i,5);
end

%Read Exciting forces from test25.3

for i = 1:6:N2-5;
    
    k = i-1;
    k=k/6 +1;

ind(k,1)= s2(i,1);
efr(k,1)= s2(i,6);
efi(k,1)= s2(i,7);
end

for i = 2:6:N2-4;
    
    k = i-2;
    k=k/6 +1;

efr(k,2)= s2(i,6);
efi(k,2)= s2(i,7);
end

for i = 3:6:N2-3;
    
    k = i-3;
    k=k/6 +1;

efr(k,3)= s2(i,6);
efi(k,3)= s2(i,7);
end

for i = 4:6:N2-2;
    
    k = i-4;
    k=k/6 +1;

efr(k,4)= s2(i,6);
efi(k,4)= s2(i,7);
end

for i = 5:6:N2-1;
    
    k = i-5;
    k=k/6 +1;

efr(k,5)= s2(i,6);
efi(k,5)= s2(i,7);
end

for i = 6:6:N2;
    
    k = i-6;
    k=k/6 +1;

efr(k,6)= s2(i,6);
efi(k,6)= s2(i,7);
end

X = cell(6,6);
for i = 1:6
    for j = 1:6
        X{i,j} = zeros(length(add(:,1)),1);
    end
end

X{1,1} = add(:,1);
X{1,5} = add(:,2);
X{2,2} = add(:,3);
X{2,4} = add(:,4);
X{3,3} = add(:,5);
X{4,2} = add(:,6);
X{4,4} = add(:,7);
X{5,1} = add(:,8);
X{5,5} = add(:,9);
X{6,6} = add(:,10);

Y = cell(6,6);
Y{1,1} = dam(:,1);
Y{1,5} = dam(:,2);
Y{2,2} = dam(:,3);
Y{2,4} = dam(:,4);
Y{3,3} = dam(:,5);
Y{4,2} = dam(:,6);
Y{4,4} = dam(:,7);
Y{5,1} = dam(:,8);
Y{5,5} = dam(:,9);
Y{6,6} = dam(:,10);



FD_coefs.tps = tps;
FD_coefs.X = X;
FD_coefs.Y = Y;

FD_coefs.ind = ind;
FD_coefs.efr = efr;
FD_coefs.efi = efi;

