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
|
Rev | Line | |
---|
[17] | 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.