www.pudn.com > shearlet.rar > psi.m, change:2009-12-31,size:1861b


function F=psi(f1,f2,j0,N,j,l,k) 
% psi 点阵显示 
 
%     psi1=@(x)Fpsi1_1(x); 
%     psi2=@(x)Fpsi2_1(x); 
    if nargin<=4 
        j=0;l=0;k=[0,0];          
    end 
 
P=[length(f1),length(f2)];          % 划分 
if l==-2^j 
    P=[P(1),P(2)]; 
%    t1=linspace(-1/2,1/2,P(1)+1); t1(end)=[];    % u值 
%     t2=linspace(0,1,P(2)+1); t2(end)=[];       % v值    
%     f1=psi1(t1); f2=psi2(t2); 
    f22=f2(P(2)/2+1:P(2));  
    I=zeros(P(1),N(2)); 
    for s1=0:P(1)-1 
        I(s1+1,:)=czt(f22,N(2),exp(2i*pi/P(2)*(2*s1/P(1)-1)*2^(j-2*j0)),exp(2i*pi/P(2)*(2*s1/P(1)-1)*k(2))); 
    end 
    F=zeros(N); 
    for n2=0:N(2)-1 
        F(:,n2+1)=czt(f1.*I(:,n2+1),N(1),exp(2i*pi/P(1)*4^(j-j0)),exp(-2i*pi/P(1)*(l*2^(j-2*j0)*n2-k(1)))); 
    end 
    F=(-1)^k(1)*(exp(-1i*pi*4^(j-j0)*(0:N(1)-1)')*exp(-1i*pi*l*2^(j-2*j0)*(0:N(2)-1))).*F;  
     
elseif l==2^j 
    f21=f2(1:P(2)/2); 
    I=zeros(P(1),N(2)); 
    for s1=0:P(1)-1 
        I(s1+1,:)=czt(f21,N(2),exp(2i*pi/P(2)*(2*s1/P(1)-1)*2^(j-2*j0)),exp(2i*pi/P(2)*(2*s1/P(1)-1)*k(2))); 
    end 
    F=zeros(N); 
    for n2=0:N(2)-1 
        F(:,n2+1)=czt(f1.*I(:,n2+1),N(1),exp(2i*pi/P(1)*4^(j-j0)),exp(2i*pi/P(1)*((1-l)*2^(j-2*j0)*n2+k(1)-k(2)))); 
    end 
    F=(-1)^(k(1)-k(2))*(exp(-1i*pi*4^(j-j0)*(0:N(1)-1)')*exp(1i*pi*(1-l)*2^(j-2*j0)*(0:N(2)-1))).*F;   
     
else % -2^j+1<=l<=2^j-1 
 
    I=zeros(P(1),N(2)); 
    for s1=0:P(1)-1 
        I(s1+1,:)=czt(f2,N(2),exp(2i*pi/P(2)*(2*s1/P(1)-1)*2^(j-2*j0)),exp(2i*pi/P(2)*(2*s1/P(1)-1)*k(2))); 
    end 
    F=zeros(N); 
    for n2=0:N(2)-1 
        F(:,n2+1)=czt(f1.*I(:,n2+1),N(1),exp(2i*pi/P(1)*4^(j-j0)),exp(2i*pi/P(1)*((1-l)*2^(j-2*j0)*n2+k(1)-k(2)))); 
    end 
    F=2*(-1)^(k(1)-k(2))*(exp(-1i*pi*4^(j-j0)*(0:N(1)-1)')*exp(1i*pi*(1-l)*2^(j-2*j0)*(0:N(2)-1))).*F;  
end 
F=real(F)/(P(1)*P(2));   % 强制实数化 
 
if j~=0 
    F=2^(1.5*j)*F; 
end