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

10 views (last 30 days)
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 29 Aug 2019
Edited: MathWorks Support Team on 29 Aug 2019
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)

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2008a

Community Treasure Hunt

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

Start Hunting!