UWB-Algorithm/UWBAnimationShow/Quaternions/quaternRotate.m

7 lines
162 B
Matlab
Raw Normal View History

2024-04-27 17:13:37 +08:00
function v = quaternRotate(v, q)
[row col] = size(v);
v0XYZ = quaternProd(quaternProd(q, [zeros(row, 1) v]), quaternConj(q));
v = v0XYZ(:, 2:4);
end