Find Euler Angles
An interactive demo for learning and visualizing 3D coordinate transformations and Euler angles.
Author: Dmitry Savransky

This submission uses the 'unused argument syntax' introduced in R2009b. (see: http://blogs.mathworks.com/steve/2010/01/11/about-the-unused-argument-syntax-in-r2009b/ ) Users of earlier versions will most likely encounter errors. You can fix these quite easily by replacing the tildes in various subfunction syntax declarations with dummy variables. I apologize to all pre-R2009b users for the inconvenience.

As usual from this author, a great addition to MATLAB. Quick note for those compiling on OS X - make sure you edit math.c line 227 as suggested in the comments below it, but don't worry about setting the library path. Your mex line should be something like:
mex -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -L/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -lMLi3 math.c

Absolutely fantastic. Exactly what I needed - many thanks. Quick note for anyone installing on RHEL5. The default rpms that may be pre-installed for GMP don't seem to work when it comes time to compile the c files. However, if you get rid of these and compile GMP and MPFR from source, everything works great.

Thank you for creating this script. I have observed significantly different results compared to Matlab's "pwelch" when analyzing the same data (uniformly sampled). Can you please elaborate on the differences between the "lomb" result and Matlab's "pwelch" result? Thank you

To clarify, the differences observed are in spectrum amplitude. The frequencies associated with the peaks are the same.