how to remove trailing zeros after rounding a matrix?
Mostrar comentarios más antiguos
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?
Respuestas (1)
format short
A = 1.23
format shortG
A = 1.23
5 comentarios
Deepthi B
el 21 de Abr. de 2021
Stephan
el 21 de Abr. de 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
el 21 de Abr. de 2021
Stephan
el 21 de Abr. de 2021
Can you provide the code?
Deepthi B
el 21 de Abr. de 2021
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!