To approximate an expression with exact values

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?

 채택된 답변

Walter Roberson
Walter Roberson 2014년 4월 18일

1 개 추천

You do not need the float(). You need
format long g
1.0/3*exp(1)*sin(2)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by