mod
Remainder after division (modulo operation)
除法(模运算)之后的余数
Syntax
b = mod(a,m)
Description
b = mod(
returns the remainder after division of a
,m
)a
by m
, where a
is the dividend and m
is the divisor. This function is often called the modulo operation, which can be expressed as b = a - m.*floor(a./m)
. The mod
function follows the convention that mod(a,0)
returns a
.
b = mod(
返回a除以m后的余数,其中a是被除数,m是除数。此函数通常称为模运算,可表示为 a
,m
)b = a - m.*floor(a./m)
。 mod函数遵循mod(a,0&