How do I round up a number?

10 ビュー (過去 30 日間)
Qilin
Qilin 2013 年 4 月 20 日
コメント済み: Steven Lord 2019 年 11 月 2 日
Hi, I was wondering whether there's any function other than 'round(X)' that can round up a number? I'm trying not to use round(X) because every time I use it, I get an error: Subscript indices must either be real positive integers or logicals. Thanks

採用された回答

the cyclist
the cyclist 2013 年 4 月 20 日
編集済み: the cyclist 2013 年 4 月 20 日
You are probably getting that error because somehow you have created a variable called "round".
What do you get if you type
>> which round
  1 件のコメント
Qilin
Qilin 2013 年 4 月 20 日
Oh my you're right, I forgot that I actually have a variable called 'round'. I'll change the variable to another name. Thank you for you help.

サインインしてコメントする。

その他の回答 (1 件)

Jai
Jai 2019 年 11 月 2 日
how to make a decimal number to always round up to nearest integer
  1 件のコメント
Steven Lord
Steven Lord 2019 年 11 月 2 日
Use the ceil function.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by