added positive definite option to matgen