How I can remove the decimal part in matlab?

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일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2015년 2월 12일

댓글:

2015년 2월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by