2018-07-23 08:17:51 +00:00
|
|
|
function omg = so3ToVec(so3mat)
|
2018-07-23 21:47:50 +00:00
|
|
|
% *** CHAPTER 3: RIGID-BODY MOTIONS ***
|
2018-07-23 08:17:51 +00:00
|
|
|
% Takes a 3x3 skew-symmetric matrix (an element of so(3)).
|
|
|
|
|
% Returns the corresponding 3-vector (angular velocity).
|
|
|
|
|
% Example Input:
|
2018-07-23 21:47:50 +00:00
|
|
|
%
|
|
|
|
|
% clear; clc;
|
|
|
|
|
% so3mat = [[0, -3, 2]; [3, 0, -1]; [-2, 1, 0]];
|
|
|
|
|
% omg = so3ToVec(so3mat)
|
|
|
|
|
%
|
2018-07-23 08:17:51 +00:00
|
|
|
% Output:
|
|
|
|
|
% omg =
|
|
|
|
|
% 1
|
|
|
|
|
% 2
|
|
|
|
|
% 3
|
|
|
|
|
|
|
|
|
|
omg = [so3mat(3, 2); so3mat(1, 3); so3mat(2, 1)];
|
|
|
|
|
end
|