フィルターのクリア

Hi,Is there anyone who could give an idea how to create a permutation vector?

1 回表示 (過去 30 日間)
Like,every time the loop constructs,the vector would change.
For example V1=[1 2 3 5 4]; V2=[2 3 1 5 4] and go on?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 6 月 6 日
V1=[1 2 3 5 4]
n=numel(V1)
idx=randperm(n)
V2=V1(idx)
  1 件のコメント
nafila aytija
nafila aytija 2016 年 6 月 6 日
what if I want to create four vector from four four different permuations?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by