matW function

Between and within covariance matrices