I have a problem with finding a solution for generating a random integer number within a defined range. The range should be the size of a matrix or array. Let’s say that I have an matrix with 500 rows. Then I would like to create a generator that generates a random number between 0 and 499. I have looked at mtRandom() function, but it’s not sufficient for this kind of task since it’s only generating numbers between 0-1.