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