Round all values in table
52 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Scott MacKenzie
il 25 Ott 2021
Modificato: Scott MacKenzie
il 25 Ott 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 Commenti
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!