% % Written by: % -- % John L. Weatherwax 2005-08-04 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % % Epage 169 % %----- close all; clc; clear; % Lets draw some decision regions: % x1 = linspace( -2, +2, 50 ); x2 = -x1; plot( x1, x2, 'k-' ); hold on; text( -1.3, 1.5, 'x_1 + x_2 = 0' ); addpath('~/Matlab'); hline( 0.25, 'k-' ); text( -1.7, .35, 'x_2 = 1/4' ); x2 = x1; plot( x1, x2, 'k-' ); text( +0.9, 1.5, 'x_1 - x_2 = 0' ); text( -1.75, -1, '(-,-,-)' ); text( -1.75, 1, '(-,+,-)' ); text( 0, 1, '(+,+,-)' ); text( 1.5, 1, '(+,+,+)' ); text( -.14, 0.18, '(+,-,-)', 'FontSize', 8 ); text( 1.5, -0.5, '(+,-,+)' ); text( 0, -1, '(-,-,+)' ); xlabel('x_1'); ylabel('x_2'); fn = ['chap_4_prob_3_class_regions.eps']; saveas(gcf,['../../WriteUp/Graphics/Chapter4/',fn],'epsc');