UWB-Algorithm/UWBAnimationShow/Quaternions/quaternRotate.m

7 lines
162 B
Matlab

function v = quaternRotate(v, q)
[row col] = size(v);
v0XYZ = quaternProd(quaternProd(q, [zeros(row, 1) v]), quaternConj(q));
v = v0XYZ(:, 2:4);
end