Last change
on this file was
17,
checked in by zhangj, 11 years ago
|
To have a stable version on the server.
|
-
Property svn:executable set to
*
|
File size:
333 bytes
|
Line | |
---|
1 | function pass = systemsolve1 |
---|
2 | |
---|
3 | % Test 2x2 system (sin/cos) |
---|
4 | % TAD |
---|
5 | |
---|
6 | tol = chebfunpref('eps'); |
---|
7 | |
---|
8 | d=domain(-pi,pi); |
---|
9 | D=diff(d); |
---|
10 | I=eye(d); |
---|
11 | Z=zeros(d); |
---|
12 | A=[I -D; D I]; |
---|
13 | x=d(:); |
---|
14 | f=[ 0*x 0*x ]; |
---|
15 | A.lbc = {[I Z],-1}; |
---|
16 | A.rbc = [Z I]; |
---|
17 | u = A\f; |
---|
18 | |
---|
19 | u1 = u(:,1); u2 = u(:,2); |
---|
20 | pass(1) = norm( u1 - cos(x)) < 100*tol; |
---|
21 | pass(2) = norm( u2 - sin(x) ) < 100*tol; |
---|
Note: See
TracBrowser
for help on using the repository browser.