Symbolic Math Toolbox | Search  Help Desk | |
double | Examples | See Also |
Convert symbolic matrix to MATLAB numeric form.
R = double(S)
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
sym
, vpa