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
Show older comments
My divisions look like this,
A=B/C;
Both B and C are integers.
Accepted Answer
More Answers (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
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!