Azzera filtri
Azzera filtri

How to generate random integer between two no (say 12 and 35) without repeat? randperm(n) give only 1 to n, but I need m to n.

1 visualizzazione (ultimi 30 giorni)
I need help

Risposta accettata

KSSV
KSSV il 10 Ago 2017
idx = 12:35 ;
N = length(idx) ;
iwant = randsample(idx,N) ;

Più risposte (0)

Categorie

Scopri di più su Random Number Generation 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