Is it possible to specify exactly how many decimal points should be displayed in MATLAB 7.6 (R2008a) UITABLE cells?

조회 수: 1 (최근 30일)
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
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개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2008a

Community Treasure Hunt

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

Start Hunting!

Translated by