Numerical values

The function sym converts numbers into exact expressions, while the function double does the reverse. Exemplary results of both expressions are given in Table 3.2.

Table 3.2: Converting numerical or symbolic expressions
Matlab Result
sym(sqrt(2)) sqrt(2)
sym(2.3654) 11827/5000
double(sin(2)+log(3)) 2.0079

You can get an idea of the magnitude of an exact expression by using the command double.

Previous      Next      Up      Contents

Esteur 2010-03-22