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
Afficher commentaires plus anciens
My divisions look like this,
A=B/C;
Both B and C are integers.
Réponse acceptée
Plus de réponses (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
Catégories
En savoir plus sur Symbolic Math Toolbox 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!