randperm for multiple times

13 ビュー (過去 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
  1 件のコメント
Bathrinath
Bathrinath 2014 年 5 月 3 日
Thank you sir

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by