How Can I mix my matrix randomly ?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
KALYAN ACHARJYA
2021-3-5
One way: Here data is 100 by 100 matrix
mat_data=data(:);
result=reshape(mat_data(randperm(100*100)),[100,100]);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!