function [Leo, FLeo]=fram4_lev_P(IND,N)
ll=1;
N1=N;

Par=IND(2);TS=IND(3);


if TS==0
r=(1:4)*floor(N/10);

Leo=zeros(4,N);
FLeo=zeros(4,N);

for kk=1:4
    [l,h,s2,s3]=lhs23(N,r(kk),kk);
    wapa  =fram4_up_hm(l, h, s2, s3, IND,1);% 
 
  Leo(kk,:)=wapa; %clear wvtr
 FLeo(kk,:)=abs(fft(wapa));
end


else 
r=(1:4)*floor(N/10);

Leo=zeros(4,N);
FLeo=zeros(4,N);
l=zeros(1,N/2);
h=l;


s=l;s(r(1))=1;
 wapa  = fram4_up_hm(l, l, s, l, IND,1);
  Leo(1,:)=wapa; 
 FLeo(1,:)=abs(fft(wapa));

s=l;s(r(2))=1;
 wapa  = fram4_up_hm(l, l, s, l, IND,-1);
  Leo(2,:)=wapa; %clear wvtr
 FLeo(2,:)=abs(fft(wapa));

s=l;s(r(3))=1;
 wapa  = fram4_up_hm(l, l, l, s, IND,1);
  Leo(3,:)=wapa; %clear wvtr
 FLeo(3,:)=abs(fft(wapa));

s=l;s(r(4))=1;
 wapa  = fram4_up_hm(l, l, l, s, IND,-1);
  Leo(4,:)=wapa; %clear wvtr
 FLeo(4,:)=abs(fft(wapa));
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


end     
function [l,h,s2,s3]=lhs23(N,r,kk)
B=zeros(4,N/2);
    B(kk,r)=1;
    l=B(1,:);h=B(2,:);
    s2=B(3,:);s3=B(4,:);


% Copyright (c) 2013. Valery A. Zheludev