Sigma2 obtained. Next step: obtain matrix G.
P matrix generation code partially written