source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/rootspol.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: 300 bytes
Line 
1function pass = rootspol
2% Roots of a perturbed polynomial
3% Rodrigo Platte, July 2008.
4
5p = chebfun( '(x-.1).*(x+.9).*x.*(x-.9) + 1e-14*x.^5' );
6r = roots(p);
7
8pass(1) = length(r)==4 && norm(p(r),inf)<1e-13*chebfunpref('eps')/eps;
9
10f = chebfun(chebpolyval([0 0 0 0 1 0]));
11
12pass(2) = roots(f) == 0;
Note: See TracBrowser for help on using the repository browser.