clear all
x1=[0 1 2 3];
y1=[3 2.5 1.4 0.9];
x= 0:0.0001:3;
y=0.2*x.^3-0.9*x.^2+0.2*x+3;
yexact=(2*x+3)./(x.^2+1);
plot(x,y,'r',x,yexact,'b',x1,y1,'*')
xlabel('The values of x');
ylabel('The values of the function');
legend('The interpolating curve','The exact curve','The given data');
title('Interpolating curves of exact function')