Fix number of decimal digits in MATLAB Table
22 次查看(过去 30 天)
显示 更早的评论
Hello,
I have made a long file with many tables in it (using the table() function of matlab). I would like to know whether there is a way to universally apply a function to my file such that all the table numbers come out to only tree decimal digits and not in four or five as they do now.
I have tried using the 'format' commands, however these do not seem to effect the values present in the tables, only those of the vectors. Plus I have not found a 'format' type of command that can apply to the whole file, within the tables too, and have control over the exact decimal places I wish to get.
That's all I would like to know, Thanks for your help in advance!
0 个评论
采纳的回答
Walter Roberson
2016-11-13
No, there is not. You would have to write code to fprintf() the content of the table with the number of decimal places you want.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!