Quaternion Toolbox v3

The quaternion toolbox for Matlab® (QTFM for short) extends Matlab® to handle vectors and matrices of quaternions. Many quaternion-specific functions are implemented, as are overloadings of standard Matlab® functions and Matlab® operators and notation. The toolbox is intended to work as far as possible in the same way as Matlab® itself. Most functions are vectorized, and where a Matlab® function is overloaded by the toolbox, as far as possible the quaternion function accepts the same parameters as the Matlab® function.

From Version 2.0 of the toolbox onwards, octonions are also supported, in a similar manner. Functions which are overloaded for octonions are noted as such in the online help, but the text may refer to quaternions alone. Some functions may not be implemented for octonions, either because we have not had the time to code them, or because an octonion algorithm is not known.

From version 3.0 of the toolbox onwards, symbolic computation with quaternions is supported, using the Matlab® Symbolic Math Toolbox, if installed (if not installed, symbolic functions will not work). Octonion symbolic computation was added with the release of version 3.1. Symbolic computation operates in the same manner as numeric computation: a quaternion or octonion may have components which are symbolic expressions or variables. It is not possible to define a quaternion itself to be symbolic: this would require much more extensive coding, and quite likely a new class to represent symbolic quaternions. Matrices of quaternions can be symbolic, again in the same sense as for numerics: the components of a quaternion may be symbolic matrices (of real or complex values).

For a general overview of quaternions and octonions, and how they are handled by the toolbox, see the overview page. For a detailed list of functions, see the alphabetical or categorized lists.

Many Matlab® functions will work with quaternion arrays, because all the functions called are overloaded by the toolbox, and the semantics of the quaternion version are consistent with what the Matlab® function expects. A list of these functions is available.

Website

The toolbox website and Sourceforge project page may be acccessed from the Matlab® Start menu, or from the following links:

Matlab® version required

Matlab® Version 7.14 (R2012a) is believed to be the minimum required system to run versions 2 or 3 of the toolbox (we don't test it ourselves with older versions than the current or immediately prior Matlab® release). Earlier versions of the toolbox will work with Version 7.4 (R2007a). The test code (see below) verifies the version required and documents the reasons for requiring it.

GNU Octave compatibility (under development)

From version 1.8 onwards, we introduced some minor changes to attempt to achieve compatibility with GNU Octave, but no further work on these has been done for some time. At present, the toolbox will not work correctly under GNU Octave. The test code (see below) will recognise that QTFM is running under Octave, but the tests will fail due to serious problems with the GNU Octave search path, and the lack of recognition by GNU Octave of the toolbox directory structure. We welcome contributions to fixing these problems, which will be acknowledged on the contributors page.

Test code

Some test code is provided in the directory test. To run it type qtfm_test in the command window. This runs all the numeric test code, and if the Matlab® Symbolic Math Toolbox is installed it will also run test code for the symbolic algebra functionality. There may be some warnings about numerical accuracy of results, which vary from one test run to the next, and can usually be ignored.

SVN Repository

We use SVN for version control of files within the toolbox. Until November 2017, we used CVS. The CVS repository was converted to SVN and therefore preserves most of the history of commits to the CVS repository. The CVS repository remains in existence for the time being, frozen at the state it was in at the end of November 2017.

New versions of files are uploaded to the SVN repository at Sourceforge as we develop them, in between releases of the toolbox. If you wish, you should be able to set up your own SVN system to provide read-only access to the repository and thus keep the toolbox updated in between releases. The effort of doing this is not likely to be worthwhile unless you already know how to use SVN.

However, it may sometimes be worthwhile to check for a newer version of a specific file, if you hit a problem. You can do this through a web interface to the SVN repository:

Contributors

A list of people who have contributed to QTFM is available on a separate page.

Acknowledgements

Contact

The authors may be contacted through the Sourceforge page or directly at the following email addresses:

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

License terms.