I have a matrix of 10*10 (in this example, actually the matrix is 234*10000) and I have to change the values at random locations.
I tried using the randperm function but it is able to change the values only in the beginning locations. Could someone advise on this please
Initial_X = X(shi);
X(shi) = randperm(5,length(shi));
Final_X = X(shi);