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

MATLAB

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.

Best Answer

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)
Related Question