%% Rotate a 1-by-3 Vector by Two 1-by-4 Quaternions
% This example shows how to rotate a 1-by-3 vector by two 1-by-4 quaternions.

q = [1 0 1 0; 1 0.5 0.3 0.1];
r = [1 1 1];
n = quatrotate(q, r)

% Copyright 2012 The MathWorks, Inc.