I have simple divisions between integers and I always get another integer as the answer. But I want at least three decimal places. I am using MATLAB R2022b
Mostrar comentarios más antiguos
My divisions look like this,
A=B/C;
Both B and C are integers.
Respuesta aceptada
Más respuestas (1)
Use format. E.g.:
B = 1;
C = 5;
A=B/C
format short
A
format long
A
format bank
A
format rat
A
format long g
A
Categorías
Más información sobre Symbolic Math Toolbox 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!