% % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- % EPage 136 close all; clc; clear; xs = -1:0.2:+1; ys = sin(pi * xs / 2).^2; x_star = 0.85; linear_approx = interp1( xs, ys, x_star, 'linear' ) spline_approx = interp1( xs, ys, x_star, 'spline' ) cubic_approx = interp1( xs, ys, x_star, 'v5cubic' ) aitken_approx = aitken( xs, ys, x_star )