File Exchange

## 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

1.66667
4 Ratings

Updated

% 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

xiong xiao

Alex Kreimer

### Alex Kreimer (view profile)

In recent MATLAB there's a 'vrrotmat2vec'

Georg Wiora

### Georg Wiora (view profile)

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

### Georg Wiora (view profile)

##### MATLAB Release
MATLAB 7.13 (R2011b)