The hypercomplex number library
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
Platform Compatibility
Windows macOS LinuxCategories
- Aerospace > Aerospace Toolbox > Standard Workflow Procedures > Coordinate Systems > Quaternion Math >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
@Hypercomplex/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |