File Exchange

image thumbnail

Calcuate Euler Angles from Rotation Matrix

version 1.0 (1.28 KB) by

This function return the rotation along x,y and z direction from a 3x3 Rotation Matrix

6 Downloads

Updated

View License

% This function return the rotation along x,y and z direction from a
% Rotation Matrix

%Inputs:
% R= 3x3 Rotation Matrix
%Outputs:
% rx= Rotation along x direction in radians
% ry= Rotation along y direction in radians
% rz= Rotation along z direction in radians

% R =
%
% [ cos(ry)*cos(rz), -cos(ry)*sin(rz), sin(ry)]
% [ cos(rx)*sin(rz) + cos(rz)*sin(rx)*sin(ry), cos(rx)*cos(rz) - sin(rx)*sin(ry)*sin(rz), -cos(ry)*sin(rx)]
% [ sin(rx)*sin(rz) - cos(rx)*cos(rz)*sin(ry), cos(rz)*sin(rx) + cos(rx)*sin(ry)*sin(rz), cos(rx)*cos(ry)]

% Author : Sandeep Sasidharan
% http://sandeepsasidharan.webs.com

Comments and Ratings (4)

xiong xiao

Alex Kreimer

In recent MATLAB there's a 'vrrotmat2vec'

Georg Wiora

This is a nice short code, but it covers only a very special case and does not tell which one exactly.
I recommend spincalc() from Jonathan Fuller. It is much more powerfull!

http://www.mathworks.com/matlabcentral/fileexchange/20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors

Georg Wiora

MATLAB Release
MATLAB 7.13 (R2011b)

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

» Watch video