
randn('state',0); rand('state',0);
figure(1); xs=-1.5:.01:1.5;
plot([0 0 1], [0 1 0], 'b.', [1], [1], 'r.', xs, 1.4-xs,'k-','markersize',50,'linewidth',3);
axis square; axis([-.25 1.25 -.25 1.25]); set(gca,'fontsize',16);
print('-dpng','-r72','linSepAnd.png');
plot([0 1], [1 0], 'b.', [0 1], [0 1], 'r.', xs, 1.4-xs,'k-','markersize',50,'linewidth',3);
axis square; axis([-.25 1.25 -.25 1.25]); set(gca,'fontsize',16);
print('-dpng','-r72','linSepXor.png');

x0=.1 * randn(100,2); x1=.1 * randn(100,2) + 1;
plot(x0(:,1),x0(:,2),'b.',x1(:,1),x1(:,2),'r.',xs, 1-xs,'k-','markersize',30,'linewidth',3);
axis square; axis([-.5 1.5 -.5 1.5]); axis off;
print('-dpng','-r72','linSep1.png');

x0=randn(100,2); x1=[randn(100,2) + 1;

randn('state',0); rand('state',0);
x0 = randn ( 100 , 2 ) * [ 1 0 ; 0 1 ] + repmat ( [ 0 0 ] , [ 100 , 1 ] ) ;   
x1 = randn ( 100 , 2 ) *[ 1 -.3 ; -.3 1 ] + repmat ( [ 2 -3 ] , [ 100 , 1 ] ); 
plot(x0(:,1),x0(:,2),'b.',x1(:,1),x1(:,2),'r.',3*xs, 4*xs-2,'k-','markersize',30,'linewidth',3);
axis square; axis([-3 5 -6 3]); axis off;
print('-dpng','-r72','linSep2.png');


randn('state',0); rand('state',0);
x0=.22 * randn(100,2); x1=.22 * randn(100,2) + 1;
plot(x0(:,1),x0(:,2),'b.',x1(:,1),x1(:,2),'r.',xs, 1-xs,'k-','markersize',30,'linewidth',3);
axis square; axis([-.5 2 -.5 2]); axis off;
print('-dpng','-r72','AA1.png');
plot(x0(:,1),x0(:,2),'b.',x1(:,1),x1(:,2),'r.',xs, 5.25-10*xs+.5,'k-','markersize',30,'linewidth',3);
axis square; axis([-.5 2 -.5 2]); axis off;
print('-dpng','-r72','AA2.png');



