How do I get the only the integer part?

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

 採用された回答

KSSV
KSSV 2022 年 10 月 11 日

0 投票

a=1.8460e+03;
round(a)
ans = 1846

その他の回答 (0 件)

カテゴリ

質問済み:

zl
2022 年 10 月 11 日

コメント済み:

zl
2022 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by