function F_E = F_Exciting(body,RB,n,L,eta0)

frac = mod(n,1);
n = floor(n);
dt = get(body,'dt');

% if (isstruct(L{1,1}) == 0)
%   N = length(L{1,1});
% else
%   N = L{7,1}.pieces+1;
% end

N = (L{7,1}.breaks(end))/dt;

tau = -(N-1)*dt:dt:dt*(N-1);

n = n + (length(eta0)-1);  %Adjust current time index for padding.
eta0 = [zeros(1,length(eta0)-1) eta0];  %Pad eta0 to represent no waves before t = 0.  



NN = 2*N-1;

F_E = zeros(1,6);
Integrand = zeros(1,NN);
for i = 1:6  
      if (isstruct(L{7,i}) == 0)
        L{7,i} = interp1(tau,L{7,i},'spline','pp');  %Convert only if coefficient structure not passed.
      end

        L{7,i} = ppval(L{7,i},tau+dt*frac);
    L_loc = L{7,i};
    for nn = 1:NN
      Integrand(nn) = eta0(n-(nn-N))*L_loc(nn);
    end
  F_E(i) = trapz(tau,Integrand);
end
