% % 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 addpath('../../BookCode'); close all; clc; clear; xs = [ 0, 0.005, 0.0075, 0.0125, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1 ]; yu = [ 0, 0.0102, 0.0134, 0.017, 0.025, 0.0376, 0.0563, 0.0812, 0.0962, 0.1035, 0.1033, 0.095, 0.0802, 0.0597, 0.034, 0 ]; yl = [ 0, -0.0052, -0.0064, -0.0063, -0.0064, -0.006, -0.0045, -0.0016, 0.001, 0.0036, 0.007, 0.0121, 0.017, 0.0199, 0.0178, 0 ]; plot( xs, yu, '.g', 'MarkerSize', 18 ); hold('on'); grid('on'); plot( xs, yl, '.k', 'MarkerSize', 18 ); pp_upper = spline( xs, yu ); ys_spline_upper = ppval( pp_upper, xs ); pp_lower = spline( xs, yl ); ys_spline_lower = ppval( xs, pp_lower ); plot( xs, ys_spline_upper, '-g' ); plot( xs, ys_spline_lower, '-k' ); legend( 'upper data', 'lower data', 'upper spline', 'lower spline', 'location', 'best' ); %saveas( gcf, '../../WriteUp/Graphics/Chapter7/c_7_p_7_plot.eps', 'epsc' );