How can I specify the number of significant digits in an output variable
조회 수: 46 (최근 30일)
이전 댓글 표시
I have a number, say 170803134921, in a character array. When I convert the array to a number it shows up with scientific notation.
temp = '170803134921'
str2num(temp)
ans = 1.708031349210000e+11
I would like to the number that is output in ans to display the same number of significant digits as the string did (12 digits) without the decimal point and scientific notation. How do I achieve this?
댓글 수: 0
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!