How Can I mix my matrix randomly ?

2 visualizaciones (últimos 30 días)
omar najjar
omar najjar el 5 de Mzo. de 2021
Respondida: KALYAN ACHARJYA el 5 de Mzo. de 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

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 5 de Mzo. de 2021
One way: Here data is 100 by 100 matrix
mat_data=data(:);
result=reshape(mat_data(randperm(100*100)),[100,100]);

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by