
function [f, tau] = extrLoads(NB,q,Q,t)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Computes net external force components f and
% torque components tau for each body in a chain.
% The parameters are
%
%       NB    = number of bodies in chain
%       q,Q   = absolute config variales for chain
%        t    = time
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


for aa=1:NB-1
  f(:,aa)   = zeros(3,1) ;
  tau(:,aa) = zeros(3,1) ;
end

f(:,NB)   = [0 0 t]' ;
tau(:,NB) = [0 0 0]' ;

