how to remove trailing zeros after rounding a matrix?
Afficher commentaires plus anciens
I need to round a matrix to two decimal places but I want to get rid of those trailing zeros after the decimal point. Even I want to use that matrix for plotting also? How to do it?
Réponses (1)
format short
A = 1.23
format shortG
A = 1.23
5 commentaires
Deepthi B
le 21 Avr 2021
Stephan
le 21 Avr 2021
There is no way to show it in workspace the way you want. Then you would have to use some dirty tricks such as save it as char or sym - but is it worth this only because of the trailing zeros?
Deepthi B
le 21 Avr 2021
Stephan
le 21 Avr 2021
Can you provide the code?
Deepthi B
le 21 Avr 2021
Catégories
En savoir plus sur Subplots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!