Rounding down when doing division in Matlab
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
L'O.G.
el 28 de Nov. de 2022
Respondida: Arif Hoq
el 28 de Nov. de 2022
How do you round when dividing such that
1/7 = 1
2/7 = 1
...
7/7 = 1
8/7 = 2
...
14/7 = 2
15/7 = 3
etc.
0 comentarios
Respuesta aceptada
Arif Hoq
el 28 de Nov. de 2022
use ceil function:
a=ceil(1/7)
b=ceil(2/7)
c=ceil(7/7)
d=ceil(8/7)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!