Re-generate random matrix

1 vue (au cours des 30 derniers jours)
Fahd Alqahtani
Fahd Alqahtani le 12 Avr 2018
Commenté : Fahd Alqahtani le 12 Avr 2018
Hi
I have a matrix A (9X9) and I want to generate a new matrix B using the same matrix of A and should be distributed randomly and each number should be used once to generate matrix B.

Réponse acceptée

David Fletcher
David Fletcher le 12 Avr 2018
Modifié(e) : David Fletcher le 12 Avr 2018
ind=randperm(81)
B=reshape(A(ind),9,9)
  1 commentaire
Fahd Alqahtani
Fahd Alqahtani le 12 Avr 2018
Thanks, David

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation 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!

Translated by