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