comparison scripts/polynomial/pchip.m @ 14364:721a4a83cba6

test: Space out %!shared variable declaration for readability * pchip.m, ppval.m: Space out %!shared variable declaration for readability
author Rik <octave@nomad.inbox5.com>
date Tue, 14 Feb 2012 10:01:18 -0800
parents f3d52523cde1
children 16164cb3b713
comparison
equal deleted inserted replaced
14363:f3d52523cde1 14364:721a4a83cba6
136 %! plot (xi,yspline, xi,ypchip,"-", x,y,"+"); 136 %! plot (xi,yspline, xi,ypchip,"-", x,y,"+");
137 %! legend ("spline", "pchip", "data"); 137 %! legend ("spline", "pchip", "data");
138 %! %------------------------------------------------------------------- 138 %! %-------------------------------------------------------------------
139 %! % confirm that pchip agreed better to discontinuous data than spline 139 %! % confirm that pchip agreed better to discontinuous data than spline
140 140
141 %!shared x,y,y2,pp,yi1,yi2,yi3 141 %!shared x, y, y2, pp, yi1, yi2, yi3
142 %! x = 0:8; 142 %! x = 0:8;
143 %! y = [1, 1, 1, 1, 0.5, 0, 0, 0, 0]; 143 %! y = [1, 1, 1, 1, 0.5, 0, 0, 0, 0];
144 %!assert (pchip (x,y,x), y) 144 %!assert (pchip (x,y,x), y)
145 %!assert (pchip (x,y,x'), y') 145 %!assert (pchip (x,y,x'), y')
146 %!assert (pchip (x',y',x'), y') 146 %!assert (pchip (x',y',x'), y')