function [GZAR] = G(ZAR,P,Q,eq,n);
         
% calulate op. G acting on the matrix (we simetrize op. then put into vector)
% (G(M))_{k,l} = (m_{k,l} + m_{l,k})/2
% 28.11.2001 rsotirov, klagenfurt  
% call: [GZAR] = G(ZAR,P,Q,eq,n); 

  
if eq == 0,
    GZAR = zeros(eq,1);
else 
   m = size(ZAR,1);
   GZAR = ( ZAR( m*(Q-1)+P) + ZAR( m*(P-1)+Q) )/2;
end;

