MATLAB: How to swapping values in matrix row

image processingmatrix

given matrix eg:-
1 6 6 8
9 5 7 2
it should be chang as
1 6 6 8
2 7 5 9

Best Answer

a=[1 6 6 8
9 5 7 2];
a(2,:) = fliplr(a(2,:));