How do I round up a number?

3 次查看(过去 30 天)
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

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by