%% Extract Quaternion from Homogeneous Transformation

tform = [1 0 0 0; 0 -1 0 0; 0 0 -1 0; 0 0 0 1];
quat = tform2quat(tform)

% Copyright 2015 The MathWorks, Inc.