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일

1 개 추천

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일

1 개 추천

how to make a decimal number to always round up to nearest integer

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2013년 4월 20일

댓글:

2019년 11월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by