%D_wW_level3P



lole1=8%input('loglength of signal;0--former; ?')
if lole1>0
    lole=lole1;
    N=2^lole;
end
shi=1;%input('shift to the center--1; ?')
%M+N;
Par1=input('spline order;0--former; ?')
if Par1>0
    p=Par1;
end
 n=0:N-1;
  [GS]=D_wP_coefP(p,N,3);

SP=zeros(4,N);fSP=SP;
fs=GS{3}{1};

s=real(ifft(fs));
SP(1,:)=s;
fSP(1,:)=abs(fs);
for kk=3:-1:1
    mm=5-kk;
fs=GS{kk}{2};    

s=real(ifft(fs));
SP(mm,:)=s;
fSP(mm,:)=abs(fs);

end
M=N;

x=(1:M)-M/2;
y=x;

figure;
subplot(2,1,1)
for kk=1:4
a=[SP(kk,:) ];
a=circ_h(a,(kk)*M/4-M/8);
plot(y,a,'LineWidth',2);
hold on
axis([y(1) y(end) -1 1])
 set(gca,'FontSize',16)
   
end
  
 
subplot(2,1,2)
for kk=1:4
a=[fSP(kk,:) ];
%a=circ_h(a,N/2);
a=a(1:N/2);
plot(a,'LineWidth',4);
hold on
axis([1,N/2, 0 3])
 set(gca,'XTick',[1 16 32 64  128])
 set(gca,'FontSize',16)

end

