Rounding down when doing division in Matlab

 Respuesta aceptada

use ceil function:
a=ceil(1/7)
a = 1
b=ceil(2/7)
b = 1
c=ceil(7/7)
c = 1
d=ceil(8/7)
d = 2

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Etiquetas

Preguntada:

el 28 de Nov. de 2022

Respondida:

el 28 de Nov. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by