close all
clear all

% part 1, plot the data set
train_data;
x1ran = [200,1200]; x2ran = [500,3600]; % data range
f1 = figure; plotdata1(X, Y, x1ran, x2ran);
title('Data');

net = svm(size(X, 2), 'linear', [ ], 100);
net = svmtrain(net, X, Y, [ ], 2);
figure; plotboundary(net, x1ran, x2ran);
plotdata(X, Y, x1ran, x2ran); plotsv(net, X, Y);
title(['SVM with linear kernel, C=100: decision boundary (black) plus Support' ...
       ' Vectors (red)']);
