function h=hank_m(hw,ny,nu,L,J)
% H=hank_m(hw,L,J)
% Purpose
% Make Hankel matrix, H_(L,J), from impulse response matrices in hw

h=zeros(ny*L,nu*J);
%***  Construct Hankel matrix  from hw  ****
k = 0;
l = 0;
ip= 0;
for i=1:L
    p = 0;
    for j=1:J
      h(k+1:k+ny,p+1:p+nu) = hw(l+1:l+ny,1:nu);    
      p = p + nu;
      l = l + ny;
    end
    ip = ip + ny;
    l  = ip;
    k  = k + ny;
end
