Posted By:
23 Mar, 2013 2:39 pm PDT

generating random number and integers

I want to create a matrix 3x3 which has random integers within the range of 5 to 10. The output should look like:

5 6 10
9 9 8
5 8 10


to generate a random integer matrix, you can use a command randi in matlab, which uses uniform distribution

>>randi ([5,10], 3,3)


Please watch the video for details

Was it useful?  

Please login to reply to this problem.