  The matrix equation $AX-XB=C$ has a solution if and only if the matrices
[A&C\\0&B] and [A &0\\0 & B] are similar. This criterion was proved over a
field by W.E. Roth (1952) and over the skew field of quaternions by Huang
Liping (1996). H.K. Wimmer (1988) obtained an analogous criterion for the
matrix equation $X-AXB=C$ over a field. We extend these criteria to the matrix
equations $AX-\widehat XB=C$ and $X-A\widehat XB=C$ over the skew field of
quaternions with a fixed involutive automorphism $q\mapsto \hat q$.
