MATLAB: How Can I mix the matrix randomly matrix 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 Best Answer One way: Here data is 100 by 100 matrixmat_data=data(:);result=reshape(mat_data(randperm(100*100)),[100,100]); Related SolutionsMATLAB: How to return from reshape function y=rand(24000,1)x=reshape(y,150,160)out=x(:) MATLAB: How to create a Matlab 5×5 matrix of numbers 1-100 Use X=randi(100,1,5*5) to get random integers <=100 or x=rand(1,5*5)*100 if you want floating decimals. Then use sort() to achieve increasing order. Then reshape the vector back into a 5x5 matrix using reshape(). Related QuestionFrequency mixingRandomMatrix manipulation, turning a column vector into a square matrixMixing randomly existing values in a vectorHow to convert the 1d into 3d data matrixLoop and mixing solution
Best Answer