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

8 visualizzazioni (ultimi 30 giorni)
What is the difference between rand and randi when using it in a 3D array

Risposta accettata

KALYAN ACHARJYA
KALYAN ACHARJYA il 25 Ago 2018
Modificato: KALYAN ACHARJYA il 25 Ago 2018
Its similar as usual, rand for uniformly distributed random number including floatings numbers, whereas randi for integers.

Più risposte (1)

madhan ravi
madhan ravi il 25 Ago 2018
Maybe try this:
array(randi([1 length(array)],1))
  8 Commenti

Accedi per commentare.

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by