Last change
on this file since 17 was
17,
checked in by zhangj, 10 years ago
|
To have a stable version on the server.
|
-
Property svn:executable set to
*
|
File size:
333 bytes
|
Line | |
---|
1 | function pass = remeztest |
---|
2 | |
---|
3 | % Nick Trefethen, 27 March 2009 |
---|
4 | |
---|
5 | % Test remez: |
---|
6 | x = chebfun('x',[-1 1]); |
---|
7 | f = abs(x) + x; |
---|
8 | pexact = .5+x; |
---|
9 | pbest = remez(f,1); |
---|
10 | err = norm(pbest-pexact); |
---|
11 | pass(1) = (err<1e-10); |
---|
12 | |
---|
13 | % Test remez and cf: |
---|
14 | f = exp(sin(exp(x))); |
---|
15 | pcf = cf(f,7); |
---|
16 | pbest = remez(f,7); |
---|
17 | pass(2) = (norm(pcf-pbest)<0.0003); |
---|
18 | |
---|
19 | pass = all(pass); |
---|
Note: See
TracBrowser
for help on using the repository browser.