IRDYn/complie/R1000 EVT GravityForce V1/mr/VecToso3.m

18 lines
394 B
Mathematica
Raw Permalink Normal View History

2024-12-16 16:33:21 +00:00
function so3mat = VecToso3(omg)
% *** CHAPTER 3: RIGID-BODY MOTIONS ***
% Takes a 3-vector (angular velocity).
% Returns the skew symmetric matrix in so(3).
% Example Input:
%
% clear; clc;
% omg = [1; 2; 3];
% so3mat = VecToso3(omg)
%
% Output:
% so3mat =
% 0 -3 2
% 3 0 -1
% -2 1 0
so3mat = [0, -omg(3), omg(2); omg(3), 0, -omg(1); -omg(2), omg(1), 0];
end