Randomly sorting rows while keeping column relationships the same

2 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Michal
Michal am 24 Sep. 2019
Bearbeitet: Michal am 24 Sep. 2019
Apermrows = A(randperm(size(A,1)),:)

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by