Calcuate Euler Angles from Rotation Matrix

This function return the rotation along x,y and z direction from a 3x3 Rotation Matrix
2.4K Downloads
Updated 2 Apr 2012

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

Cite As

Sandeep Sasidharan (2026). Calcuate Euler Angles from Rotation Matrix (https://www.mathworks.com/matlabcentral/fileexchange/35970-calcuate-euler-angles-from-rotation-matrix), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0