source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/chebpadetest.m @ 17

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: 581 bytes
Line 
1function pass = chebpadetest
2
3% Nick Hale  22/04/2009
4
5tol = chebfunpref('eps');
6
7M = 4;
8N = 4;
9d = [-1, 0, 3];
10P = chebfun(chebpolyval([-0.6817    0.0558    2.1122   -1.3813    0.5045]),d);
11Q = chebfun(chebpolyval([0.5246   -0.2679   -0.8573    0.1155    1]),d);
12R = P./Q;
13[r p q] = chebpade(R,M,N);
14err = norm(chebfun(P.funs(1),d(1:2))-p)+norm(chebfun(Q.funs(1),d(1:2))-q);
15pass1 = err < 100*tol*R.scl;
16
17
18M = 6;
19N = 5;
20[r p q] = chebpade( P./Q,M,N);
21err = norm(chebfun(P.funs(1),d(1:2))-p)+norm(chebfun(Q.funs(1),d(1:2))-q);
22pass2 = err < 100*tol*R.scl;
23
24pass = pass1 && pass2;
25
Note: See TracBrowser for help on using the repository browser.