% Reflect right half of A onto left half

clear all

A= rand(3,4)
[n, m] = size(A);

for  g= 1: n
    for  h= 1: floor(m/2)
        A(g,h)= A(g, m-h+1);
    end
end

disp('After reflect operation:')
disp(A)