fig2_3.m 344 B

1234567891011121314
  1. % Local Regression and Likelihood, Figure 2.3.
  2. %
  3. % Using different smoothing parameters.
  4. load ethanol;
  5. alp = [0.2 0.4 0.6 0.8];
  6. f=['a','b','c','d'];
  7. for (i=1:4)
  8. figure('Name', sprintf( 'figure2_3%c: Changing smoothing parameters', f(i) ) );
  9. fit = locfit(E,NOx,'alpha',alp(i));
  10. lfplot(fit);
  11. title(strcat('a = ',num2str(alp(i))));
  12. end;