makePsd function

Returns the positive semidefinite projection of a symmetric matrix using the eigenvalue method