[Matlab]Desperate help with a simple code.

How Can I generate 1,000,000 random integers with range of [5 -----> 18] in a square matrix using the randi fucntion? Thank you.

 Accepted Answer

M = randi([5,18],1000);

1 Comment

Thank you so much. Can I ask you one more question? How about finding the probability of a certain number and a range of certain numbers at M?

Sign in to comment.

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Tags

Asked:

on 20 Oct 2014

Commented:

on 20 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!