# Calcuate Euler Angles from Rotation Matrix

Version 1.0.0.0 (1.28 KB) by
This function return the rotation along x,y and z direction from a 3x3 Rotation Matrix
Updated 2 Apr 2012

% 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 (2024). 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
##### Categories
Find more on Unit Conversions in Help Center and MATLAB Answers