user9552185
user9552185

Reputation:

I want to convert a 4x1 vector column to skew symmetric matrix

for example

Q=[a;b;c;d]

S is skew symmetric which satisfies the condition -S= S^T

is that true the skew symmetric of Q is

S(Q) =[0   -a   d   -c
       a    0   c    b
      -d   -c   0   -a
       c   -b   a    0]   ?

and how do it in matlab directly ?

Upvotes: 2

Views: 1828

Answers (1)

Anthony
Anthony

Reputation: 3801

Yes, your S(Q) is a skew symmetric matrix, since S(i,j) == -S(j,i);. I'm not sure what you meant by a skew symmetric matrix of Q, since with a given set of value, you can create many different skew symmetric matrices, for example:

S(Q) =[0   -a   b   -c
       a    0   c    d
      -b   -c   0   -a
       c   -d   a    0]

The above is also a skew symmetric matrix constructed using values of Q. Note that the positions of b and d are switched.

If your skew symmetric is only limited to 4x1 and takes the form specified in your question, then you can create a function for it:

function s=skew(q)

if numel(q) ~= 4
     error('Input vector must have 4 elements.')
end
s=[0 -q(1) q(4) -q(3)
   q(1) 0 q(3) q(2)
   -q(4) -q(3) 0 -q(1)
   q(3) -q(2) q(1) 0];

Then

skew_Q = skew(Q);

Upvotes: 3

Related Questions