matlab make last value the first one etc
flipud(your_matrix) %Makes the first row be the last one, the second one become the second last one etc.
Source: www.mathworks.com
flipud(your_matrix) %Makes the first row be the last one, the second one become the second last one etc.