randperm for multiple times

11 visualizaciones (últimos 30 días)
Bathrinath
Bathrinath el 3 de Mayo de 2014
Comentada: Bathrinath el 3 de Mayo de 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

Respuesta aceptada

Image Analyst
Image Analyst el 3 de Mayo de 2014
Change seq to a(i,:).
n=6;
a=zeros(100,n);
for i=1:100
a(i,:) = randperm(n)
end

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by