www.pudn.com > zishiyingjiami.rar > RTLJ.m, change:2011-12-08,size:616b


function A8=RTLJ(A) 
%Ҷع 
[m,n]=size(A); 
for i=1:m 
    for j=1:n 
        if j<=n/2 
            A1(i,j)=A(i,j);  %F1=A6 
        else 
            A2(i,j-n/2)=A(i,j);  %F2=A9 
        end 
    end 
end 
A3=bitxor(A2,A1);  %F3=A8 
[m1,n1]=size(A3); 
for i=1:m1 
    for j=1:n1 
        A4(1,(i-1)*n1+j)=A3(i,j); 
        A5(1,(i-1)*n1+j)=A2(i,j); 
    end 
end 
A6=vper(A4,A5); 
for i=1:m1 
    for j=1:n1 
        A7(i,j)=A6((i-1)*n1+j); 
    end 
end 
for i=1:m 
    for j=1:n 
        if j<=n/2 
            A8(i,j)=A7(i,j); 
        else 
            A8(i,j)=A2(i,j-n/2); 
        end 
    end 
end