필터 지우기
필터 지우기

Issue when using ceil function

조회 수: 2 (최근 30일)
Silvester
Silvester 2023년 2월 9일
답변: Tushar Behera 2023년 2월 9일
Hello,
I am new to Matlab. I noticed a difference when using the ceil function:
a = ceil(511*5e-6*8e5);
b = ceil(511*5*0.8);
May I know the reason why I got different results for a and b?

채택된 답변

Tushar Behera
Tushar Behera 2023년 2월 9일
Hi Silvester,
The results for a and b are different because the expressions for each of them are different. The issue is not with MATLAB but it is due to how the data for floating point numbers are stored in a computer.
For a better understanding please refer to this MATLAB Answer,
I hope this helps you.
Regards,
Tushar

추가 답변 (1개)

Image Analyst
Image Analyst 2023년 2월 9일

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by