Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [5,-4,-3,0,2];
- xi = -4:0.1:2;
- y = [8,-5,16,-2,-1];
- i1 = interp1(x,y,xi,'cubic');
- i2 = interp1(x,y,xi,'linear');
- i3 = interp1(x,y,xi,'spline');
- plot(xi,i1,xi,i2,'r-')
- hold on
- plot(xi,i3,'b-',x,y,'Og')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement