How to get coefficient in integer division in matlab?

I wonder how to get quotient in integer division in MATLAB? Thank you and welcome!

+3
source share
3 answers

Use idivide :

C = idivide (A, B) is the same as A./B, except that fractional ratios are rounded to zero to the nearest integers.

There is a third optional parameter for controlling rounding behavior, which is explained on the MathWorks site I am associated with.

+4
source

just divide and round?

or you are talking about integer division, in which case use idivide

+1
source

:

floor(A/B)

floor , (-inf).

0

Source: https://habr.com/ru/post/1740383/


All Articles