Documentation Center

  • Trial Software
  • Product Updates

mod

Symbolic matrix element-wise modulus

Syntax

C = mod(A,B)

Description

C = mod(A,B) for symbolic matrices A and B with integer elements is the positive remainder in the elementwise division of A by B. For matrices with polynomial entries, mod(A, B) is applied to the individual coefficients.

Examples

ten = sym('10');
mod(2^ten, ten^3)
ans =
24
syms x
mod(x^3 - 2*x + 999, 10)
ans =
x^3 + 8*x + 9

See Also

Was this topic helpful?