source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/rootspol.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

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.