| Symbolic Math Toolbox | ![]() |
Syntax
R = double(S)
Description
double(S) converts the symbolic object S to a numeric object. If S is a symbolic constant or constant expression, double returns a double-precision floating-point number representing the value of S. If S is a symbolic matrix whose entries are constants or constant expressions, double returns a matrix of double precision floating-point numbers representing the values of S's entries.
Examples
double(sym('(1+sqrt(5))/2')) returns 1.6180.
a = sym(2*sqrt(2)); b = sym((1-sqrt(3))^2); T = [a, b] double(T)return
ans = 2.8284 0.5359
| digits | dsolve | ![]() |