Skip to content

Commit

Permalink
Update plotData.m
Browse files Browse the repository at this point in the history
  • Loading branch information
malakar-soham authored Jul 31, 2019
1 parent 16f558b commit 3a59c0e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions plotData.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,15 @@ function plotData(X, y)
% PLOTDATA(x,y) plots the data points with + for the positive examples
% and o for the negative examples. X is assumed to be a Mx2 matrix.

% Create New Figure
% Creating New Figure
figure; hold on;

% ====================== YOUR CODE HERE ======================
% Instructions: Plot the positive and negative examples on a
% 2D plot, using the option 'k+' for the positive
% examples and 'ko' for the negative examples.
%

pos = find(y==1);
neg = find(y==0);
plot(X(pos,1),X(pos,2),'k+','LineWidth',2);
%hold on;
plot(X(neg,1),X(neg,2),'ko', 'MarkerFaceColor','y');





% =========================================================================



hold off;

end

0 comments on commit 3a59c0e

Please sign in to comment.