Round all values in table
47 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have a table with calculated values. Now I want to round all values to 2 decimals. How can I do that in once for the whole table?
0 commentaires
Réponses (1)
Scott MacKenzie
le 25 Oct 2021
Modifié(e) : Scott MacKenzie
le 25 Oct 2021
I think this achieves what you are after:
% test data
T1 = array2table(rand(5))
% rounded to 2 decimal places
T2 = array2table(round(T1{:,:},2))
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!