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!

采纳的回答

Walter Roberson
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 CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by