>> 5 % 3 2 >> 5 % (-3) 2 .> (-5) % 3 -2 >> (-5) % (-3) -2 >> r = 10 % pi 0.5752220392 >> (10 - r) / pi 3
If one of p and q is a matrix and the other is a scalar, or both are matrices of the same storage type, then p % q is defined as a matrix, whose entries are the element-wise modulus of the entries of p and q.