function [track, indices]  = getPoints(xs, ys, m, b, width)
	track = [];
	indices = [];
	inliers = 0;

	numPoints = length(xs);
	for j=1:numPoints,
		%Find point of closest approach
		if closestApprDist(xs(j), ys(j), m, b) <= width
			inliers = inliers + 1;
			track = [track; [xs(j), ys(j)]];
			indices = [indices; [j]];
		end
	end	

end



function dist = closestApprDist(x, y, m,b)

	mInv = -1/m;
	bInv = y - mInv*x;
	xClosest = (b - bInv)/(mInv - m);
	yClosest = m*xClosest +b;
	dist = norm( [xClosest, yClosest]- [x,y] );
end