function linearPlot( d, c, weights)

maxs = max(d);
mins = min(d);

steps = (maxs - mins) / 100;
x = zeros(101,101);
y = zeros(101,101);
z = zeros(101,101);

for i = 0:100
    for j = 0:100
        xt = steps(1) * i + mins(1);
        yt = steps(2) * j + mins(2);
        x(i+1, j+1) = xt;
        y(i+1, j+1) = yt;
        z(i+1, j+1) = sign([xt yt] * weights(1:2));
    end
end
z(101, 101) = -1;

contour(x, y, z, 1, 'k');
hold on
i = find(c == -1);
scatter(d(i,1), d(i,2), 'r')
i = find(c == 1);
scatter(d(i,1), d(i,2), 'b')
hold off

