function [phi,teta,psi] = invRPY(M)
%Extrai os angulos de euler a partir da matrix de transf. geometrica M
%(ignorando a translaçao) !!  teta E [-pi/2 , +pi/2] .
%   Detailed explanation goes here
phi=atan2(M(2,1),M(1,1));
teta=atan2(-M(3,1),sqrt((M(3,2))^2+(M(3,3))^2));
psi=atan2(M(3,2),M(3,3));

end

