How do I get the only the integer part?

18 Ansichten (letzte 30 Tage)
zl
zl am 11 Okt. 2022
Kommentiert: zl am 11 Okt. 2022
I want to get the 1846,but I get the 1845.Why is that?
Is there any other good way?
a=1.8460e+03;
a1=fix(a);
>>
1845

Akzeptierte Antwort

KSSV
KSSV am 11 Okt. 2022
a=1.8460e+03;
round(a)
ans = 1846

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by