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