dl=ones(1,254);
ol=ones(1,255);


for l=0:7,
   for v=0:15,
   m=l*16+v+1;
   dld(1,m)=2^l*(v+16.0)-16.5;
   old(1,m)=2^l*(v+16.5)-16.5;
end
end
dl1=dld(1:1,3:128);
dl2=-1.*fliplr(dl1);
dl=[dl2 dld];
ol1=old(1:1,2:128);
ol2=-1.*fliplr(ol1);
ol=[ol2 old];
s=0:-5:-60;
s1=.05.*s;
ss=(4079.5/2^.5)*10.^s1;
x0=0;
nmin=x0-3.*ss;
nmax=x0+3.*ss;
for j=1:length(ss)
   i(j)=1;
while(i(j)<=254&dl(1,i(j))<nmin(j))
   i(j)=i(j)+1;
end
imin(j)=i(j)-1;
if imin(j)<1
   imin(j)=1;
end
if imin(j)>254
   imin(j)=254;
end
end
for j=1:length(ss)
   i(j)=254;
   while (i(j)>=1&dl(1,i(j))>nmax(j))
      i(j)=i(j)-1;
   end
   imax(j)=i(j);
   if imax(j)<1
      imax(j)=1;
   end
   if imax(j)>254
      imax(j)=254;
   end
   end