フィルターのクリア

What while loop can be used here to stop Matlab giving me any reminder?

1 回表示 (過去 30 日間)
Hdez
Hdez 2020 年 11 月 16 日
回答済み: David Hill 2020 年 11 月 16 日
I don't want Matlab to give me any reminder resulsts in the hx or hy, just integer numbers.
h= input('Enter the desire grid spacing:');
hx=(lx/h)+ 1; %NC
hy=(ly/h)+ 1; %NR

回答 (1 件)

David Hill
David Hill 2020 年 11 月 16 日
Use floor and ceil
hx=floor(lx/h)+1;
hy=ceil(ly/h)+1;

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by