function [V, V1] = GtG(G)
% compare G'*G with vectors multiplication and with direct multiplication.
tic
[M, N] = size(G);
V = zeros(N);
for j = 1:N
    for k = j:N
        V(j, k) = G(:, j)'*G(:, k);
    end
end
toc

tic
V1 = G'*G;
toc