How I can remove the decimal part in matlab?

26 ビュー (過去 30 日間)
Ameligege
Ameligege 2015 年 2 月 12 日
コメント済み: Ameligege 2015 年 2 月 13 日
in the division operation i want only the real part without the decimal part? like 4.56 I want only 4 how can i do that?

採用された回答

Image Analyst
Image Analyst 2015 年 2 月 12 日
Look up the help for round(), floor(), ceil(), and fix(). Those all do that and leave the number as a double. If you want an integer data type, you can use uint8(), uint32(), int32(), uint16(), and int32(). These also chop off the fraction and round, but give you an integer data type instead of a floating point data type.

その他の回答 (1 件)

Eduardo Márquez
Eduardo Márquez 2015 年 2 月 12 日
編集済み: Eduardo Márquez 2015 年 2 月 12 日
  1 件のコメント
Ameligege
Ameligege 2015 年 2 月 13 日
thank you.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by