David
Farruggio

MathGenie

rem

Remainder after division

Syntax and Description

rem(a,b) returns the remainder after division of a by b, where a is the dividend and b is the divisor. This function is often called the remainder operation, which can be expressed as r = a - b.*fix(a./b). The rem function follows the convention that rem(a,0) is NaN.

Back to functions