[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 = Ht;
y = Fat;

figure(1);
plot(x,y,'b*');
xlabel('Height');
ylabel('Pct Body Fat');
title('Figure 1.4');

b1 = corr(x,y)*std(y)/std(x)
b0 = mean(y) - b1*mean(x)
xx = [min(x) max(x)]';
yy = b0 + b1*xx;
hold on;
plot(xx,yy,'r-');
alpha(0.5);
hold off;
