Symbolic Math Toolbox | ![]() ![]() |
Another Example
The next example is perhaps more interesting. Start with the symbolic expression
produces the printed floating-point value
Using the second argument of vpa
to specify the number of digits,
We suspect that f
might actually have an integer value. This suspicion is reinforced by the 30 digit value, vpa(f,30)
Finally, the 40 digit value, vpa(f,40)
shows that f
is very close to, but not exactly equal to, an integer.
![]() | Example: Using the Different Kinds of Arithmetic | Linear Algebra | ![]() |