How Can I mix my matrix randomly ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
omar najjar
le 5 Mar 2021
Réponse apportée : KALYAN ACHARJYA
le 5 Mar 2021
Bascially I have a matrix of size 100*100 and I want to reorder it randomly , how can I do that ?
Also can I do that by using randi ?
thanks
0 commentaires
Réponse acceptée
KALYAN ACHARJYA
le 5 Mar 2021
One way: Here data is 100 by 100 matrix
mat_data=data(:);
result=reshape(mat_data(randperm(100*100)),[100,100]);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!