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
Sean de Wolski 2011년 5월 6일

1 개 추천

as long as
class(your_result)
is 'double' it is long.

댓글 수: 4

Basanta
Basanta 2011년 5월 6일
please clarify....
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
Matt Tearle 2011년 5월 6일
or use something like fprintf('%16.13f',x) to see the result to whatever precision you want.
Basanta
Basanta 2011년 5월 7일
got it....Thank u..

댓글을 달려면 로그인하십시오.

카테고리

질문:

2011년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by