MATLAB does not use colon as a statment separator or statement terminator. You should remove it from the end of your for line.
Note: when the first parameter to the rng() function is numeric, then the parameter must be a scalar, not a vector of integers.
Note: the rng() function always returns a structure that gives information about the internal state of the random number generator. The mod() function will not accept that structure as the second parameter to mod().