idivide
Integer division with rounding option
Description
divides each element of C = idivide(A,B)A by the corresponding element of
B, rounded to the nearest integers toward zero. A
and B must contain real numbers and at least one of them must belong to
an integer class.
If
AandBare arrays, then they must belong to the same integer class and have sizes that are compatible.If
AorBis a scalar double, then the other input must be an integer class, but notint64oruint64. Theidividefunction then returnsCas the same integer class.
Examples
Input Arguments
Output Arguments
Tips
The function
idivide(A,B,'round')is the same asA./BandB.\Afor integer data types. The argumentoptprovides the rounding options forA./BandB.\Awhen dividing integers.MATLAB® does not support complex integer division.
Extended Capabilities
Version History
Introduced in R2006a