if 'extrap' extrapolation is used, the new vector doesn't give expected result. If zero is filled in the extrapolation points, the result somewhat matches the expected result.

Is there any other extrapolation algorithm which can give better accuracy?

program here,

`a=[ 2 4 7 9 3 6 8]; % vector`

xold=linspace(3,9,7); % old x axis

xnew=linspace(1,11,11); % new x axis

anew=interp1(xold,a,xnew,'spline','extrap'); % new vector

% anew=interp1(xold,a,xnew,'spline',0); % new vector

## Best Answer