Method on @sym: real (z)

Real part of a symbolic expression.

Examples:

syms z
real(z)
  ⇒ ans = (sym) re(z)

syms x real
real(x)
  ⇒ ans = (sym) x

real([x  sym(pi) + 6i  7  3i])
  ⇒ ans = (sym) [x  π  7  0]  (1×4 matrix)

See also: @sym/imag, @sym/conj, @sym/ctranspose.

Package: symbolic