[Matlab]Desperate help with a simple code.

1 visualización (últimos 30 días)
Hadi
Hadi el 20 de Oct. de 2014
Comentada: Hadi el 20 de Oct. de 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.

Respuesta aceptada

Roger Stafford
Roger Stafford el 20 de Oct. de 2014
Editada: Roger Stafford el 20 de Oct. de 2014
M = randi([5,18],1000);
  1 comentario
Hadi
Hadi el 20 de Oct. de 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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by