Code covered by the BSD License  

Highlights from

5.0 | 7 ratings Rate this file 107 Downloads (last 30 days) File Size: 136 KB File ID: #33341
image thumbnail




18 Oct 2011 (Updated )

quaternion class, vectorized, converts among rotation representations, numerical Euler propagation

| Watch this File

File Information

quaternion.m is a matlab class that implements quaternion mathematical operations, 3 dimensional rotations, transformations of rotations among several representations, and numerical propagation of Euler’s equations for rotational motion. All quaternion.m class methods except PropagateEulerEq are fully vectorized.


Function To Convert Between Dcm, Euler Angles, Quaternions, And Euler Vectors inspired this file.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
16 Aug 2014 Amy

Amy (view profile)

I'd like to commend you for a powerful set of scripts. I learned a lot by running the demo and changing the parameters. Great contribution.
Is there a way for me to use your code to simulate a wobbling rigid body? I think about the out-of-balance case like an unbalanced tire rotating in space.

04 Jul 2014 Rody Oldenhuis

Rody Oldenhuis (view profile)

09 Apr 2014 spencer

spencer (view profile)

Are the euler angles defined as "body-fixed" or "world-fixed"?

Comment only
29 Oct 2013 Windo

Windo (view profile)

This is great stuff. Concise and functional. However, I have a problem with function 'unitvector'. It is used in several places in the code but it is nowhere to be seen. Here's an example error message when trying to use 'OmegaAxis':

1492 [axis, omega] = unitvector( omegav, 1 );
Undefined function 'unitvector' for input arguments of type 'double'.

Error in quaternion/OmegaAxis (line 1492)
[axis, omega] = unitvector( omegav, 1 );

25 Jul 2013 Felix

Felix (view profile)

Thank you for your nice work.

When i use the function "interp1", MATLAB warns the function "isrow" undefined. Is this a bug?

11 Jul 2013 Nicolas

Super great ! Thanks a lot

21 Feb 2013 Alessandro

nice work

05 Feb 2013 Ted Shultz

This is a nice full featured quaternion class with excellent documentation and clean code.

Comment only
05 Feb 2013 Ted Shultz  
29 Dec 2011

fixed bugs, added some new methods

18 May 2012

A few new methods and small bug fixes

13 Nov 2012

added quaternion.OmegaAxis to get angular velocity vectors from time series of quaternions

16 Jan 2013

change normalize, rand; fix isequal*, rotateutov; add dot, interp1, randRot

22 Nov 2013

Added missing unitvector function for OmegaAxis method

Contact us