MATLAB Answers

L. Yang
0

Randomly sorting rows while keeping column relationships the same

Asked by L. Yang
on 24 Sep 2019
Latest activity Commented on by L. Yang
on 24 Sep 2019
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

  0 Comments

Sign in to comment.

Products


Release

R2019b

1 Answer

Answer by Michal Kvasnicka on 24 Sep 2019
Edited by Michal Kvasnicka on 24 Sep 2019
 Accepted Answer

Apermrows = A(randperm(size(A,1)),:)

  1 Comment

Works great Thank you!

Sign in to comment.