Method on @sym: hypot (x, y)
Method on @sym: hypot (x, y, z, …)

Return hypoteneuse (distance) from symbolic expressions.

Example of computing distance:

syms x y real
syms z
hypot (x, y, z)
  ⇒ (sym)
         ________________
        ╱  2    2      2
      ╲╱  x  + y  + │z│

Another example involving complex numbers:

hypot (sym([12 2]), [3+4i 1+2i])
  ⇒ (sym) [13  3]  (1×2 matrix)

See also: @sym/atan2.

Package: symbolic