source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/interp1test.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 343 bytes
Line 
1function pass = interp1test
2
3% Nick Trefethen March 2009
4
5d = domain(-2,1.5);
6ff = @(x) 1./(1+25*x.^2);
7x = linspace(-2,1.5,11);
8f = chebfun(ff,d);
9p = interp1(x,ff(x),d);
10pass1 = (abs(min(p)-(-2.439))<0.01);
11
12x = chebfun('x');
13f = max(0,1-2*abs(x-.2));
14xk = [0 .5 1];
15p = interp1(xk,f);
16pass2 = (abs(p(-1)-0.4)<0.01);
17
18pass = pass1 && pass2;
Note: See TracBrowser for help on using the repository browser.