[Matlab]Desperate help with a simple code.

1 visualizzazione (ultimi 30 giorni)
Hadi
Hadi il 20 Ott 2014
Commentato: Hadi il 20 Ott 2014
How Can I generate 1,000,000 random integers with range of [5 -----> 18] in a square matrix using the randi fucntion? Thank you.

Risposta accettata

Roger Stafford
Roger Stafford il 20 Ott 2014
Modificato: Roger Stafford il 20 Ott 2014
M = randi([5,18],1000);
  1 Commento
Hadi
Hadi il 20 Ott 2014
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?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by