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

1 Ansicht (letzte 30 Tage)
Hdez
Hdez am 12 Nov. 2020
Beantwortet: Walter Roberson am 12 Nov. 2020
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

Antworten (1)

Walter Roberson
Walter Roberson am 12 Nov. 2020
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.

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by