function v = lvals(r1,c1,r2,c2)
%
rdif = abs(r1-r2);
cdif = abs(c1-c2);
len = max(rdif,cdif);
stepr = rdif/len;
stepc = cdif/len;
if rdif>0
  if r1<r2
    rvals = r1:stepr:r2;
  else
    rvals = fliplr(r2:stepr:r1);
  end
else
  rvals = r1*ones(len+1,1)';
end;
if cdif>0
  if c1<c2
    cvals = c1:stepc:c2;
  else
    cvals = fliplr(c2:stepc:c1);
  end
else
  cvals = c1*ones(len+1,1)';
end;
v = [rvals' cvals'];
