MATLAB codes for restoring definiteness of a symmetric matrix by shrinking