How do I round up a number?

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

 Respuesta aceptada

the cyclist
the cyclist el 20 de Abr. de 2013
Editada: the cyclist el 20 de Abr. de 2013

1 voto

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 comentario

Qilin
Qilin el 20 de Abr. de 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.

Iniciar sesión para comentar.

Más respuestas (1)

Jai
Jai el 2 de Nov. de 2019

1 voto

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

Categorías

Etiquetas

Preguntada:

el 20 de Abr. de 2013

Comentada:

el 2 de Nov. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by