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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by