Randomly sorting rows while keeping column relationships the same

15 visualizaciones (últimos 30 días)
L. Yang
L. Yang el 24 de Sept. de 2019
Comentada: L. Yang el 24 de Sept. de 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

Respuesta aceptada

Michal
Michal el 24 de Sept. de 2019
Editada: Michal el 24 de Sept. de 2019
Apermrows = A(randperm(size(A,1)),:)

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by