Quaternion Function Reference

disp

Display array
(Quaternion and octonion overloadings of standard MATLAB® function)

Syntax

disp(X)

Description

disp(X) displays the value of the quaternion X. For a scalar argument, disp displays the value of the quaternion using char. Otherwise it outputs a concise summary of the quaternion, indicating the dimensions, whether the value is pure, and whether it has complex components. If the components are not of class double (including complex double) disp also outputs information about the class of the components.

disp is called implicitly by MATLAB® after operations that yield a quaternion result and where display of the result has not been suppressed by the use of a semi-colon.

As with the corresponding MATLAB® function, disp does not output the name of the array being displayed.

To display the numeric values in a non-scalar quaternion array, use displayall or show.

Examples

>> disp(qi)
     1 * I + 0 * J + 0 * K
>> disp(randq(3,5))
     3x5 quaternion array
>> disp(v(randq(2)))
     2x2 pure quaternion array
>> disp(randq(3,2) + randq(3,2) .* i)
     3x2 complex quaternion array
The following example shows how the class of the components is displayed when they differ from the default (double).
>> cast(randv(2), 'int8')
 
ans = 2x2 pure quaternion array with int8 components

See Also

QTFM functions: display, displayall, show
MATLAB® functions: disp, display

© 2008-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.