1function R = tform2rotm( T )
 2%TFORM2ROTM Extract rotation matrix from homogeneous transformation
 3
 4%#codegen
 5
 6R = T(1:3,1:3);
 7
 8end
 9