quatdivide - Divide quaternion by another quaternion

Syntax

n = quatdivide(q,r)

Description

n = quatdivide(q,r) calculates the result of quaternion division, n, for two given quaternions, q and r. Inputs q and r can each be either an m-by-4 matrix containing m quaternions, or a single 1-by-4 quaternion. n returns an m-by-4 matrix of quaternion quotients. Each element of q and r must be a real number. Additionally, q and r have their scalar number as the first column.

Examples

Determine the division of two 1-by-4 quaternions:

q = [1 0 1 0];
r = [1 0.5 0.5 0.75];
d = quatdivide(q, r)


d =

    0.7273    0.1212    0.2424   -0.6061

Determine the division of a 2-by-4 quaternion by a 1-by-4 quaternion:

q = [1 0 1 0; 2 1 0.1 0.1];
r = [1 0.5 0.5 0.75];
d = quatdivide(q, r)


d =

    0.7273    0.1212    0.2424   -0.6061
    1.2727    0.0121   -0.7758   -0.4606

See Also

quatconj, quatinv, quatmod, quatmultiply, quatnorm, quatnormalize, quatrotate

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS