What is the difference between rand and randi when using it in a 3D array

9 visualizaciones (últimos 30 días)
What is the difference between rand and randi when using it in a 3D array

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 25 de Ag. de 2018
Editada: KALYAN ACHARJYA el 25 de Ag. de 2018
Its similar as usual, rand for uniformly distributed random number including floatings numbers, whereas randi for integers.

Más respuestas (1)

madhan ravi
madhan ravi el 25 de Ag. de 2018
Maybe try this:
array(randi([1 length(array)],1))
  8 comentarios
madhan ravi
madhan ravi el 25 de Ag. de 2018
Give a vote for my answer if you find it useful :)

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by