source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/adaptapply.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: 325 bytes
Line 
1function pass = adaptapply
2
3tol = chebfunpref('eps');
4
5d = domain(0,2);
6x = chebfun('x',d);
7f = sin(exp(2*x));
8g = x.^3-cos(x);
9
10% Operator mode
11F = diag(f);
12pass(1) = norm( F*g - f.*g ) < tol;
13
14% Apply mode
15F = chebop( @(n) diag( f(1-cos(pi*(0:n-1)/(n-1)))), [], d, 0);
16pass(2) = norm( F*g - f.*g ) < 500*chebfunpref('eps');
Note: See TracBrowser for help on using the repository browser.