0001
0002
0003
0004
0005
0006 load spencer;
0007
0008 figure('Name','fig1_2a: Spencer mortality data');
0009 plot(age,mortality,'o');
0010 title('15-point rule');
0011 xlabel('Age (Years)');
0012 ylabel('Mortality Rate');
0013 hold on;
0014 plot(age,spence15(mortality));
0015 hold off;
0016 figure('Name','fig1_2b: Spencer mortality data');
0017 plot(age,mortality,'o');
0018 xlabel('Age (Years)');
0019 ylabel('Mortality Rate');
0020 title('21-point rule');
0021 hold on;
0022 plot(age,spence21(mortality));
0023 hold off;