Quaternions

Quaternion class and demo of its applications. Quaternion matrix multiplication, spherical linear interpolation, and Euler angle I/O.
40 Downloads
Updated 1 Apr 2022

View License

Quaternion class I made during a university course to help me understand quaternions and MATLAB better. Definitely not as fully-featured as the official MathWorks alternatives.
Try the included "doodle.m" & "randrot.m" functions for a demonstration of how quaternions can be used to generate complex-looking rotations and paths in 3D space with compact notation.
Documentation for the class is in several block comments at the top of the m-file.

Cite As

Aaron Becker (2026). Quaternions (https://www.mathworks.com/matlabcentral/fileexchange/109129-quaternions), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0