Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How do I round up a number?

Asked by Qilin on 20 Apr 2013

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

0 Comments

Qilin

Tags

Products

No products are associated with this question.

1 Answer

Answer by the cyclist on 20 Apr 2013
Edited by the cyclist on 20 Apr 2013
Accepted answer

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 Comment

Qilin on 20 Apr 2013

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.

the cyclist

Contact us