random permutation for a matrix
Afficher commentaires plus anciens
I have a 2x5 matrix, A. I want to randoming sort both of the rows together, so that the second is still a function of the first row.
A = [ 2 5 9 11 23; 4 1 7 9 12]
One random permutation may look like
B= [5 11 9 2 23; 1 9 7 4 12]
The 1st and 2nd row are still the same ratio
Im trying to use the function randperm
Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!