function G = g_stat(s,m)
sv = s'; sv = sv(:)'; % prevod matice priznakov na vektor
mv = m'; mv = mv(:)'; % prevod matice priznakov na vektor
 
a(:,1) = sv;
a(:,2) = mv;

A = sum(sum(log(a).*a));
B = sum(log(sum(a,2)).*sum(a,2));
C = sum(log(sum(a,1)).*sum(a,1));
D = sum(sum(a)).*log(sum(sum(a)));

G = abs(2*(A-B-C+D));
end