randperm for multiple times

11 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by