%% Extract Euler Angles from Homogeneous Transformation Matrix

tform = [1 0 0 0.5; 0 -1 0 5; 0 0 -1 -1.2; 0 0 0 1];
eulZYX = tform2eul(tform)

% Copyright 2015 The MathWorks, Inc.