Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
I need help

Réponse acceptée

KSSV
KSSV le 10 Août 2017
idx = 12:35 ;
N = length(idx) ;
iwant = randsample(idx,N) ;

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by