source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/systemapply.m

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

To have a stable version on the server.

  • Property svn:executable set to *
File size: 475 bytes
Line 
1function pass = systemapply
2
3tol = chebfunpref('eps');
4
5% Test 2x2 systems applied to functions.
6% TAD
7
8d=domain(-pi,pi);
9D=diff(d);
10I=eye(d);
11Z=zeros(d);
12A=[I+2*D^2 -D; D Z];
13B = A^2;
14x=d(:);
15u=[ sin(x) exp(x) ];
16
17v = A*u;
18w = A*v;
19z = (B+3)*u;
20
21u1 = u(:,1); u2 = u(:,2);
22pass(1) = norm( v(:,1) - (u1+2*diff(u1,2)-diff(u2))) < tol;
23pass(2) = norm( v(:,2) - (diff(u1))) < tol;
24pass(3) = norm( w - B*u ) < 1e-10*(tol/eps);
25pass(4) = norm( z - w - 3*u ) < 1e-10*(tol/eps);
26
27end
Note: See TracBrowser for help on using the repository browser.