Quaternion Function Reference

orthogonal

Construct unit pure quaternions orthogonal to elements of a pure quaternion array

Syntax

U = orthogonal(V, W)

Description

orthogonal(V, W) constructs and returns an array of unit pure quaternions each orthogonal to the corresponding element of V, and W if given. V and W must be pure quaternions, but need not have unit modulus. Elements of W need not be orthogonal to the corresponding elements of V, but they must not be parallel.

Either or both of V or W may be a scalar, in which case, it is treated as if the same size as the other.

The function works for the complex quaternion case as well as for real quaternions.

Examples

>> orthogonal(qi, qj)
 
ans = 0 * I + 0 * J + 1 * K

>> A = randv(3);
>> B = orthogonal(A, quaternion(1,0,1));
>> scalar_product(A, B)

ans =

   1.0e-16 *

         0    0.5551   -0.0694
    0.0520         0         0
         0    0.5551   -0.5551

(c) 2008-2016 Stephen J. Sangwine and Nicolas Le Bihan

License terms.