randperm for multiple times

조회 수: 11 (최근 30일)
Bathrinath
Bathrinath 2014년 5월 3일
댓글: Bathrinath 2014년 5월 3일
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