Skip to content

mod

Modulo operation

mod(A, B)

  • A and B should be arrays of the same sizes.
  • It gives the remainder of a divided by b, where a and b are elements of A and B, respectively.
  • It gives the same result as rem(A, B).
  • If one of the input arguments is scalar, the scalar would be expanded to a constant array having the same size as the other input argument.