function [a,list] = delc(al,i1,j1)
%
% delc: zero out column neighbors of al(i1,j1) and al(i1,j1) itself
%       called by simridge
% On input:
%     al:
%     i1:
%     j1:
% On output:
%     a:
%     list:
% Call:
%      [a,list] = delc(al,i1,j1)
%

list = [];
a = al;
[m,n] = size(al);
count = 0; i2 = i1; done = 0;
while (i2>0) & (done==0)
  i2 = i2-1;
  if i2==0
    done = 1;
  elseif al(i2,j1) == 0
    done = 1;
  else
    a(i2,j1) = 0;
	count = count+1;
	list(count,1) = i2;
	list(count,2) = j1;
  end
end
a(i1,j1) = 0;
count = count+1;
list(count,1) = i1;
list(count,2) = j1;
i2 = i1; done = 0;
while (i2<(m+1)) & (done==0)
  i2 = i2+1;
  if i2>m
    done = 1;
  elseif al(i2,j1) == 0
    done = 1;
  else
    a(i2,j1) = 0;
	count = count+1;
	list(count,1) = i2;
	list(count,2) = j1;
  end
end
