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


function A5=UTD(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(A2,A1);                %用A1置乱A2 
A4=bitxor(A3,A1);   
for i=1:m 
    for j=1:n 
        if i<=m/2 
            A5(i,j)=A1(i,j); 
        else 
            A5(i,j)=A4(i-m/2,j); 
        end 
    end 
end