   function C = MatSquare(H)
 % H is a 2n-by-2n matrix whose entries satisfy
 %          (i)   H(1:n,1:n) = -H(n+1:2n,n+1:2n)'.
 %          (ii)  H(1:n,n+1:2n) = H(1:n,n+1:2n)'.
 %          (iii) H(n+1:2n,1:n) = H(n+1:2n,1:n)'.
 % C = H*H.
 [m,m] = size(H); n = m/2;
 A = H(1:n,1:n); F = H(1:n,n+1:2*n); G = H(n+1:2*n,1:n);
 % Note that
 %               
 %    C = H^2 = [A F;G -A']^2 = [A*A+FG  AF-FA' ; G*A-A'*G  (A*A+F*G)^2]
 
 M1 = A*A;
 M2 = F*G;
 M3 = A*F;
 M4 = G*A;
 C = [M1+M2 M3-M3' ; M4-M4' (M1+M2)'];
 