Check the Modes of Interpolation
x = 0:10; y = sin(x); xi = 0:0.1:10; yi1 = interp1(x,y,xi,'spline'); yi2 = interp1(x,y,xi,'linear'); yi3 = interp1(x,y,xi,'nearest'); yi4 = interp1(x,y,xi,'cubic'); figure(1) plot(x,y,'o',xi,yi1) title('spline キュービックスプライン内挿 ') figure(2) plot(x,y,'o',xi,yi2) title('linear 線形内挿(デフォルト) ') figure(3) plot(x,y,'o',xi,yi3) title('nearest 最近傍内挿 ') figure(4) plot(x,y,'o',xi,yi4) title('cubic 区分的キュービックエルミート内挿 ')



