function plot_decision_boundary(w, X, y)
plot_data(X(:,2:3), y);
hold on

plot_x = [min(X(:,2))-2,  max(X(:,2))+2];
plot_y = (-1./w(3)) .* (w(2) .* plot_x + w(1));
plot(plot_x, plot_y)
xlabel('Exam 1 score')
ylabel('Exam 2 score')
legend('Admitted', 'Not admitted', 'Decision Boundary')
axis([30, 100, 30, 100])

hold off

end
