Method on @sym: dot (a, b)

Symbolic dot (scalar) product.

This function computes ’sum (conj (A) .* B)’.

Examples:

a = [sym('a1'); sym('a2'); sym('a3')];
b = [sym('b1'); sym('b2'); sym('b3')];
dot(a, b)
  ⇒ (sym)
         __      __      __
      b₁⋅a₁ + b₂⋅a₂ + b₃⋅a₃
dot(a, a)
  ⇒ (sym)
         __      __      __
      a₁⋅a₁ + a₂⋅a₂ + a₃⋅a₃
syms x
a = [x; 0; 0];
b = [0; 0; sym(1)];
dot(a, b)
  ⇒ ans = (sym) 0

See also: @sym/cross.

Package: symbolic