Mercurial > hg > octave-lyh
comparison scripts/polynomial/roots.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | 690c91f741b8 |
comparison
equal
deleted
inserted
replaced
7410:8a3b2ccc4e11 | 7411:83a8781b529d |
---|---|
111 else | 111 else |
112 r = []; | 112 r = []; |
113 endif | 113 endif |
114 | 114 |
115 endfunction | 115 endfunction |
116 | |
117 %!assert(all (all (abs (roots ([1, -6, 11, -6]) - [3; 2; 1]) < sqrt (eps)))); | |
118 | |
119 %!assert(isempty (roots ([]))); | |
120 | |
121 %!error roots ([1, 2; 3, 4]); | |
122 |