% Plot approximations for several polynomial degrees

m = 20;

a = -5;
b = 5;

linespec = {'r','g','b','r--','g--','b--','r--*','g--*','b--*','r--+','g--+','b--+'};

for n=2:13
  % Compute the coefficients
  c = runge_lstsq(m,n);

  % Plot the solution
  plot_runge(c,n,n==2,linespec{n-1})
end
hold off

legend('f','n=2','n=3','n=4','n=5','n=6','n=7','n=8','n=9','n=10','n=11','n=12','n=13');

