%
% [cxl,czl] = cellfunc(x1,xn,z1,zn)
%
% I haven't a clue what this function is supposed to accomplish.  BB.
%
%
function [cxl,czl] = cellfunc(x1,xn,z1,zn)

for k=1:length(x1)

  cxl(k)=1;

  for i=1:length(xn)-1

    if x1(k) >= xn(i)
      if x1(k) < xn(i+1)
        cxl(k)=i;
        break
      end
    end
    
  end
  
end

for k=1:length(z1)

  czl(k)=1;
  
  for i=1:length(zn)-1
    
    if z1(k) >= zn(i)
      if z1(k) < zn(i+1)
        czl(k)=i;
        break
      end
    end
    
  end
  
end
