Display number with engineering notation
이전 댓글 표시
I'm trying to display a number I read in with textscan in engineering notation. I was trying to switch the format to short eng and do:
evalc('disp(x)')
But it doesn't matter what format I set, the format textscan reads it in is what it uses.
댓글 수: 1
Harry Dymond
2020년 5월 31일
편집: Harry Dymond
2020년 5월 31일
For the benifit of those stumbling across this old thread in search of answers: please see my answer below
채택된 답변
추가 답변 (2개)
Harry Dymond
2020년 5월 31일
3 개 추천
For the benifit of those stumbling across this old thread in search of answers: my FEX submission num2eng will do this, and offers SI prefixes as well as engineering notation.
owr
2011년 11월 8일
0 개 추천
Try sprintf with a format string. It converts the number to a text string with a format of your choosing. Some built in MATLAB functions use this trick, for example, edit the code for dlmread.
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!