Fix number of decimal digits in MATLAB Table

22 visualizaciones (últimos 30 días)
Kosta
Kosta el 13 de Nov. de 2016
Comentada: Kosta el 13 de Nov. de 2016
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!

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Nov. de 2016
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.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by