To approximate an expression with exact values
8 views (last 30 days)
Show older comments
adibbakarrudin
on 18 Apr 2014
Answered: Walter Roberson
on 18 Apr 2014
1) 1.0/3*exp(1)*sin(2)
ans =
0.8239
BUT when I used command,
2) float(1.0/3*exp(1)*sin(2))
Error using float (line 46)
The input argument to float was not a supported type. The only recognized strings are 'single'
and 'double'. The input type was 'double'.
How can I get an expression with exact values?
0 Comments
Accepted Answer
Walter Roberson
on 18 Apr 2014
You do not need the float(). You need
format long g
1.0/3*exp(1)*sin(2)
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!