Let's consider two symmetric real matrices $A$ and $B$ of dimension $2N$ and with the same (algebraic) eigenvalues, possibly degenerate.
Is there a simple criterion to tell whether there exists or not a symplectic orthogonal matrix $S$ that transforms $A$ into $B$ ? $B=S^\top A S $
Can I build explicitly such a matrix ?
Thanks, Olivier