Randomly sorting rows while keeping column relationships the same

23 ビュー (過去 30 日間)
L. Yang
L. Yang 2019 年 9 月 24 日
コメント済み: L. Yang 2019 年 9 月 24 日
Hi
I have a 30x10 matrix. The columns are the features (10 characteristics) and each row represents a datapoint (30 people). I would like to randomize the order of the rows (aka to shuffle the order that each person is listed) while keeping the row unchanged so that the features for each person are all in the same row. Can someone help me with that please?
thanks

採用された回答

Michal
Michal 2019 年 9 月 24 日
編集済み: Michal 2019 年 9 月 24 日
Apermrows = A(randperm(size(A,1)),:)

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by