[Fat Age Wt Ht Neck Chest Waist Hip Thigh Knee Ankle Bicep Forearm Wrist] ...
    = textread('Bodyfat.txt','%f%d%f%f%f%f%f%f%f%f%f%f%f%f','headerlines',1);

x = Waist;
y = Fat;

figure(1);
plot(x,y,'k+');
xlabel('Waist Size (in)');
ylabel('Body Fat (%)');
title('Figure 3.12');

x = (x - mean(x))/std(x);
y = (y - mean(y))/std(y);
figure(2);
plot(x,y,'k+');
xlabel('Standardized Waist Size');
ylabel('Standardized Body Fat');
title('Figure 3.13');

figure(3);
ind = x.*y>=0;
plot(x(ind),y(ind),'g+');
hold on;
ind = x.*y<0;
plot(x(ind),y(ind),'r+');
plot([0 0], [min(y) max(y)], 'k-');
plot([min(x) max(x)], [0 0], 'k-');
hold off;
xlabel('Standardized Waist Size');
ylabel('Standardized Body Fat');
title('Figure 3.14');
