how to store matlab results in long precision
이전 댓글 표시
I am working with long precision values... after performing arithmetic division operation matlab is giving the rounded up result but i need to store the exact long precision value..
답변 (1개)
Sean de Wolski
2011년 5월 6일
as long as
class(your_result)
is 'double' it is long.
댓글 수: 4
Basanta
2011년 5월 6일
Sean de Wolski
2011년 5월 6일
MATLAB uses long (ieee 754 double precision floating point (64 bits)) to begin with. Unless your data is something else, IT IS LONG. It may not be displaying all of the digits, but they're there.
To visualize:
format long
disp(your_result)
And use class() as above to verify
Matt Tearle
2011년 5월 6일
or use something like fprintf('%16.13f',x) to see the result to whatever precision you want.
Basanta
2011년 5월 7일
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!