how to remove trailing zeros after rounding a matrix?
Ältere Kommentare anzeigen
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?
Antworten (1)
format short
A = 1.23
format shortG
A = 1.23
5 Kommentare
Deepthi B
am 21 Apr. 2021
Stephan
am 21 Apr. 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
am 21 Apr. 2021
Stephan
am 21 Apr. 2021
Can you provide the code?
Deepthi B
am 21 Apr. 2021
Kategorien
Mehr zu Numbers and Precision finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!