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


function A5=RTL(A) 
[m,n]=size(A); 
bm1=1;em1=m/2;bm2=m/2+1;em2=m;bn1=1;en1=n/2;bn2=n/2+1;en2=n; 
%右对左重构 
A1(:,bn1:en1)=A(:,bn1:en1);           %左半部分 
A2(:,bn1:en1)=A(:,bn2:en2);           %右半部分 
A3=per(A1,A2);                        %用A6置乱A7 
A4=bitxor(A3,A2); 
for i=1:m 
    for j=1:n 
        if j<=n/2 
            A5(i,j)=A4(i,j); 
        else 
            A5(i,j)=A2(i,j-n/2); 
        end 
    end 
end