Is it possible to specify exactly how many decimal points should be displayed in MATLAB 7.6 (R2008a) UITABLE cells?
조회 수: 1 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2009년 6월 27일
편집: MathWorks Support Team
2019년 8월 29일
I would like to display the data in UITABLE cells with specific number of decimal digits. Currently MATLAB only lets you use the formats supported by the FORMAT command. I would like to know how to display numeric data in a format that is not amongst one of those supported formats.
It would be nice to have more control over the display format.
채택된 답변
MathWorks Support Team
2019년 8월 29일
편집: MathWorks Support Team
2019년 8월 29일
The ability to specify number of decimal points displayed in UITABLE cells is not available in MATLAB 7.6 (R2008a).
To work around this issue, use SPRINTF function to convert numeric data to strings with specified format. Once you have this string which contains data in desired format, you can place this string in the UITABLE cell.
For example:
data=12.4395800321;
str=sprintf('%2.10f',data)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!