Remove digs function and replace with sdiag which is backward compatible