x1 = linspace(0,2*pi,60); x2 = linspace(0,2*pi,6); plot(x1, sin(x1), x2, sin(x2),'--') xlabel('x') ylabel('sin(x)') title('Linear Interpolation') x = 1:5; y = x.^1.9; interp1(x,y, [2.5, 3.8], 'linear') [2.5^1.9 3.8^1.9] interp1(x,y, [2.5, 3.8], 'cubic')