Method on @sym: cross (a, b)

Symbolic cross product.

Examples:

a = [sym('a1'); sym('a2'); sym('a3')];
b = [sym('b1'); sym('b2'); sym('b3')];
cross(a, b)
  ⇒ (sym 3×1 matrix)
      ⎡a₂⋅b₃ - a₃⋅b₂ ⎤
      ⎢              ⎥
      ⎢-a₁⋅b₃ + a₃⋅b₁⎥
      ⎢              ⎥
      ⎣a₁⋅b₂ - a₂⋅b₁ ⎦

cross(a, a)
  ⇒ (sym 3×1 matrix)
      ⎡0⎤
      ⎢ ⎥
      ⎢0⎥
      ⎢ ⎥
      ⎣0⎦

See also: @sym/dot.

Package: symbolic