Check out example codes for "matlab modulo". It will help you in understanding the concepts better.

Code Example 1

% Mod 2 would be:

y = 27
y = mod(y, 2)

% mod(<Value>, <divisor>)

Learn ReactJs, React Native from akashmittal.com