www.pudn.com > zishiyingjiami.rar > DTU.m, change:2011-12-09,size:445b


function A5=DTU(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(bm1:em1,:)=A(bm1:em1,:);   %上半部分  
A2(bm1:em1,:)=A(bm2:em2,:);   %下半部分 
A3=per(A1,A2);                %用A2置乱A1 
A4=bitxor(A3,A2);   
for i=1:m 
    for j=1:n 
        if i<=m/2 
            A5(i,j)=A4(i,j);   %上半部分为置乱异或结果 
        else 
            A5(i,j)=A2(i-m/2,j);%下半部分不变 
        end 
    end 
end