The hypercomplex number library

Version 1.0.0.0 (5.12 KB) by Martin V.
The code implements the library for hypercomplex numbers. It uses the Cayley-Dickson construction.
332 Downloads
Updated 17 Aug 2011

View License

The code implements Hypercomplex numbers library by means of object programming.
The library is based on the Cayley-Dickson construction.

Description of individual methods:

Hypercomplex - a constructor. The input is double array with parts of the
hypercomplex number (parts must be real) or Hypercomplex
object (the constructor get the copy of the input in this
case). Example:
Hypercomplex([1 2 -5 10]) represents the quaternion
1+2i-5j+10k.

The input of following methods is one parameter only, the Hypercomplex
object variable.

disp - it displays parts of hypercomplex number
double - it converts the hypercomplex number to the double array
getDimension - it gets the dimension of the hypercomplex number
norm - it gets the norm of the hypercomplex number
conjugate - it gets the conjugation of the hypercomplex number
nextAlgebra - it transforms the hypercomplex number from the certain
Cayley-Dickson algebra to the upper one by filling zeros
to the end of the hypercomplex number

addZeros - it adds the select count of zeros to the end of the
hypercomplex number. The method has two parameters, the
Hypercomplex object and the count of added zeros.

Following operators are overloaded: +,- (also unary) and *. The result of the
operation is the Hypercomplex object.

Cite As

Martin V. (2024). The hypercomplex number library (https://www.mathworks.com/matlabcentral/fileexchange/32559-the-hypercomplex-number-library), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0