No BSD License
%wav2.m %constructs the tree structered wavelet transform of %the input matrix (down to given level) function [gout]=wav2(gr1,level) [N1 N2]=size(gr1); if (N1>level), gr2=wav1(gr1); sb1=gr2(1:N1/2,1:N1/2); sb2=gr2(N1/2+1:N1,1:N1/2); sb3=gr2(1:N1/2,N1/2+1:N1); sb4=gr2(N1/2+1:N1,N1/2+1:N1); sub1=wav2(sb1,level); sub2=wav2(sb2,level); sub3=wav2(sb3,level); sub4=wav2(sb4,level); gout(1:N1/2,1:N1/2)=sub1; gout(N1/2+1:N1,1:N1/2)=sub2; gout(1:N1/2,N1/2+1:N1)=sub3; gout(N1/2+1:N1,N1/2+1:N1)=sub4; else gout=gr1; end;
Contact us at files@mathworks.com