Is it possible to obtain a random sample of values from a matrix without the randsample tool?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Is it possible to obtain a random sample of values from a matrix without the randsample tool?
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 24 Nov 2012
Modifié(e) : Azzi Abdelmalek
le 24 Nov 2012
A=magic(6);
out=A(randi(numel(A),1))
if you want 3 values for example
out=A(randi(numel(A),3,1))
1 commentaire
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!