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.

 Respuesta aceptada

David Fletcher
David Fletcher el 12 de Abr. de 2018
Editada: David Fletcher el 12 de Abr. de 2018

3 votos

ind=randperm(81)
B=reshape(A(ind),9,9)

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Abr. de 2018

Comentada:

el 12 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by