How to stop MATLAB from giving you a reminder or decirmals?

조회 수: 1 (최근 30일)
Hdez
Hdez 2020년 11월 12일
답변: Walter Roberson 2020년 11월 12일
I want Matlab to stop giving me a reminder on this formula
h= input('Enter the desire grid spacing:');
hx=(lx/h)+ 1; %NC
hy=(ly/h)+ 1; %NR

답변 (1개)

Walter Roberson
Walter Roberson 2020년 11월 12일
hx = floor(lx/h) + 1; %NC
hy = floor(ly/h) + 1; %NR
There are also situations where it is better to use ceil() instead of floor(). And some situations where round() is better.

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by