Rounding down when doing division in Matlab

 Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Centro assistenza e File Exchange

Prodotti

Release

R2021b

Tag

Richiesto:

il 28 Nov 2022

Risposto:

il 28 Nov 2022

Community Treasure Hunt

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

Start Hunting!

Translated by