On orthogonal and symplectic matrix ensembles