You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
619 B
Matlab
30 lines
619 B
Matlab
10 years ago
|
function plotData(X, y)
|
||
|
%PLOTDATA Plots the data points X and y into a new figure
|
||
|
% 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
|
||
|
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.
|
||
|
%
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
% =========================================================================
|
||
|
|
||
|
|
||
|
|
||
|
hold off;
|
||
|
|
||
|
end
|