@sym
: double (x) ¶Convert symbolic to doubles.
Example:
x = sym(1) / 3 ⇒ x = (sym) 1/3 double (x) ⇒ ans = 0.3333
Despite the name, this is one way to convert a complex sym to floating point:
z = sym(4i) - 3; double (z) ⇒ ans = -3 + 4i
If conversion fails, you get an error:
syms x double (x) -| ??? ... Cannot convert expression ...
See also: sym, vpa.
Package: symbolic