change variable storage format
7 次查看(过去 30 天)
显示 更早的评论
i have a matrix with have all sorts of values, like 1.062e+03 or 7.5646546.
i want to change the variable storage format to nonexponential and to 2 digits after decimal, for example 1062 and 7.56, because later on i'm displaying it in a uitable.
thank you
1 个评论
Stephen23
2018-1-11
编辑:Stephen23
2018-1-11
"i want to change the variable storage format to nonexponential and to 2 digits after decimal, for example 1062 and 7.56"
This makes no sense. How numbers are stored in memory is totally irrelevant to how they are displayed in something like a uitable. If both of those numbers are class double then there is absolutely no distinction between how the values 1.062e+03 or 7.5646546 are stored in memory, and absolutely no way to change that storage (short of changing the value or storing it using a different class).
Do NOT confuse how numbers are stored in memory (esp. the class) with how a number is displayed (controlled by format, fprintf, the Variable Viewer, etc).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dialog Boxes 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!