四元数除法不等于逆乘法 (q1 / q2 != q1 * q2^-1)?

Quaternion division not equal to multiplication with inverse (q1 / q2 != q1 * q2^-1)?

从几个文档中,例如 [1] and [2],我了解到四元数的除法运算等同于乘以它的逆运算。也就是说,对于两个四元数q1q2,我们有

然而,当我在 MATLAB 中对此进行验证时,会给出不同的结果(也通过 quat2rotm 将它们进一步转换为旋转矩阵来验证)。请参阅下面的代码:

q1 = [1 0 1 0];
q2 = [1 0.5 0.5 0.75];
q1 = quatnormalize(q1);  % this seems doesn't matter
q2 = quatnormalize(q2);  % this seems doesn't matter

res_1 = quatdivide(q1, q2)               % this will be [0.7385  0.1231 0.2462 -0.6155]
res_2 = quatmultiply(q1, quatinv(q2))    % this will be [0.7385 -0.6155 0.2462 -0.1231]

如有任何提示,我们将不胜感激。

请注意,四元数除法会导致符号不明确。

your 2nd reference 中读到

要对此进行扩展,请查看两种解释的结果:

它们的区别在于向量部分叉积的符号。

我怀疑 quatdivide() 使用了第二个约定,例如

quatdivide(q1,q2) = quatmultiply(quatinverse(q2),q1)