% % Fit linear spline to lynx data and give Lagrange polynomial through the % data. The Lagrange polynomial was found in Maple and imported. % load lynxdata xg = [0:0.1:10]; llg1 = 0.0002329971231*xg.^10-0.01260375279*xg.^9+0.2918220793*xg.^8; llg2 = -3.769377359*xg.^7+29.66065598*xg.^6-145.6997097*xg.^5; llg3 = 440.1403031*xg.^4-775.8231679*xg.^3+716.8069578*xg.^2-259.4951132*xg+4; llg = llg1 + llg2 + llg3; plot(xd,yd,'g-',xd,yd,'m*','markersize',7); grid on; hold on; plot(xg,llg,'r-');