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)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Edited: MathWorks Support Team
on 29 Aug 2019
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
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)
0 Comments
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!