| Symbolic Math Toolbox™ | ![]() |
r = double(S)
r = 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.
double(sym('(1+sqrt(5))/2')) returns 1.6180.
The following statements
a = sym(2*sqrt(2)); b = sym((1-sqrt(3))^2); T = [a, b]; double(T)
return
ans =
2.8284 0.5359![]() | doc | dsolve | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |