-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathskewVee.m
31 lines (27 loc) · 904 Bytes
/
skewVee.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function x = skewVee(X)
% SKEWVEE generates a [3 * 1] vector from a [3 * 3] matrix. In particular,
% this function does two operations: first, it creates the skew
% symmetric matrix of the form (X - X')/2, and then retrives from
% this skew symmetric matrix the [3 * 1] vector composing it.
%
% FORMAT: x = skewVee(X)
%
% INPUT: - X = [3 * 3] matrix
%
% OUTPUT: - x = [3 * 1] vector
%
% Authors: Daniele Pucci, Marie Charbonneau, Gabriele Nava
%
% all authors are with the Italian Istitute of Technology (IIT)
% email: [email protected]
%
% Genoa, Dec 2017
%
%% --- Initialization ---
% skew symmetric part of X
X_skew = 0.5*(X - transpose(X));
% vector composing the matrix
x = [-X_skew(2,3)
X_skew(1,3)
-X_skew(1,2)];
end