File Exchange

image thumbnail

Use of quaternions to numerically solve the problem of the spinning top

version 1.0 (1.86 KB) by

Use of quaternions to numerically solve the problem of the spinning top.

1 Download

Updated

View License

% Use of quaternions to numerically solve the problem of the spinning top
% The top is released with an angular velocity of 1000 revolutions per
% minute(rpm) around its axis of symmetry (the body z axis), which makes
% an angle of 60 ° with the vertical (the inertial Z axis).

Comments and Ratings (1)

Dan Couture

Ran into some bugs on this:

* Matrix B wasn't declared
* Should specify g
* Add a transpose to MoX to make it a 3x1
* QXx was not defined
* use a incremented variable for t instead of w(t)
* You'll also probably need to normalize the quaternion regularly to avoid additive errors.

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video