how to write 12 digit after comma

조회 수: 2 (최근 30일)
vaya putra
vaya putra 2019년 7월 13일
댓글: vaya putra 2019년 7월 13일
i read in vtk file as input file
D= [ ' 0.99999884292 0.99999951733 1 0.99999737897 0.99998922997 0.99998569147 0.99999033688 0.99999377443 1 1 0.99999976986 0.99999785577]
E=sscanf(D,'%f');
E =[1 1 1 1 1 1 1 1 1 1 1 1]; %result
but i do not want that, what i needed is [0.99999884292 0999xx .... ...... ..]
i tried
E=sscanf(D.'%1.12f') did not worked

채택된 답변

madhan ravi
madhan ravi 2019년 7월 13일
format longg
E=sscanf(D,'%f')
  댓글 수: 3
madhan ravi
madhan ravi 2019년 7월 13일
I get:
E =
0.99999884292
0.99999951733
1
0.99999737897
0.99998922997
0.99998569147
0.99999033688
0.99999377443
1
1
0.99999976986
0.99999785577
vaya putra
vaya putra 2019년 7월 13일
okay thank,
since i open in excel it right. thank you for your help

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by