randperm for multiple times

11 vues (au cours des 30 derniers jours)
Bathrinath
Bathrinath le 3 Mai 2014
Commenté : Bathrinath le 3 Mai 2014
Hi, I need randperm has to be generated for 100 times which has to be saved in 'a'. Suggest some points.
n=6;
a=zeros(100,n);
for i=1:100
seq=randperm(n)
end

Réponse acceptée

Image Analyst
Image Analyst le 3 Mai 2014
Change seq to a(i,:).
n=6;
a=zeros(100,n);
for i=1:100
a(i,:) = randperm(n)
end
  1 commentaire
Bathrinath
Bathrinath le 3 Mai 2014
Thank you sir

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB 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