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