How Can I mix my matrix randomly ?

1 Ansicht (letzte 30 Tage)
omar najjar
omar najjar am 5 Mär. 2021
Beantwortet: KALYAN ACHARJYA am 5 Mär. 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

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 5 Mär. 2021
One way: Here data is 100 by 100 matrix
mat_data=data(:);
result=reshape(mat_data(randperm(100*100)),[100,100]);

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by