0001
0002
0003
0004
0005 load ethanol;
0006 d = [2 3];
0007 a = [0.49 0.59];
0008 main = {'Local Quadratic','Local Cubic'};
0009 f=['a','b'];
0010 for (i=1:2)
0011 figure('Name', sprintf( 'figure2_6%c: Influence and variance functions', f(i) ) );
0012 fit = locfit(E,NOx,'nn',a(i),'deg',d(i),'ev','grid','mg',100);
0013 vecr(fit)
0014 plot(E,zeros(88,1),'o');
0015 title(main{i});
0016 hold on;
0017 lfplot(fit,'what','infl');
0018 lfplot(fit,'what','vari','--');
0019 xlabel('Equivalence Ratio');
0020 ylabel('Influence');
0021 legend('Data','Influence Function','Variance Function');
0022 hold off;
0023 end;