From: Mark Shore on
"Mine " <taskanmine(a)yahoo.com> wrote in message <ht3eki$drm$1(a)fred.mathworks.com>...
> Thank you for your kind responses but the cause of the question is that I do not have randi function, I looked at this from internet and my -help randi - did not give an answer, and in addition i am not a student just a new user who could not find the proper key words in her search and ask question! Thank you very much for your consideration. It was my first question from this web site to try to learn something about a new program myself. And also thank you for encouraging new self-learners who are not students that make homework!!!

Ah, OK. Possibly it's a newer function; it's in 2009b and 2010a but it can be hard to find out when functions were introduced.

In that case keep in mind that rand generates pseudorandom numbers in the open interval (0,1). Consider how you would rescale this and use floor, ceil or round to generate integers over the range you want.
From: Peter Perkins on
On 5/20/2010 9:49 AM, Mine wrote:
> Thank you for your kind responses but the cause of the question is that
> I do not have randi function

RANDI was introduced in R2008b. I believe that prior to R2008b, the
help examples for RAND showed how to do what you want.