Randomly sorting rows while keeping column relationships the same

16 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by