N=200 % generate random features for class 1 x1=5+randn(N,1); y1=13+2*randn(N,1); %generate random features for class 2 x2=18+2.2*randn(N,1); y2=9+3.5*randn(N,1); figure(1) plot(x1,y1,'+',x2,y2,'or') xlabel('length (m)') ylabel('width (m)') title('2-class, 2 feature problem--easily separable with a line for the decision boundary') legend('class 1', 'class 2') grid on