Rounding down when doing division in Matlab
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
L'O.G.
am 28 Nov. 2022
Beantwortet: Arif Hoq
am 28 Nov. 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 Kommentare
Akzeptierte Antwort
Arif Hoq
am 28 Nov. 2022
use ceil function:
a=ceil(1/7)
b=ceil(2/7)
c=ceil(7/7)
d=ceil(8/7)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!