MATLAB: How can we get back our original image after jumbling. Is there any reverse method in matlab?

reverse operation

I have an image and i apply row shuffling on it..now i want my original image back. How it is possible.

Best Answer

you can only do this when you also have stored information on the indices that were used for the shuffling.
for example if you would have used sort on your matrix
[Asorted, idx] = sort(A);
than you could get the original A back by
Aorg = Asorted(idx);
If you did not store this information, than it is not possible to "reverse" anything in matlab