comparison scripts/polynomial/roots.m @ 2312:204cc7db6f4a

[project @ 1996-07-11 21:20:36 by jwe]
author jwe
date Thu, 11 Jul 1996 21:20:36 +0000
parents 2b5788792cad
children 5ca126254d15
comparison
equal deleted inserted replaced
2311:2b5788792cad 2312:204cc7db6f4a
20 ## usage: roots (v) 20 ## usage: roots (v)
21 ## 21 ##
22 ## For a vector v with n components, return the roots of the 22 ## For a vector v with n components, return the roots of the
23 ## polynomial v(1) * z^(n-1) + ... + v(n-1) * z + v(n). 23 ## polynomial v(1) * z^(n-1) + ... + v(n-1) * z + v(n).
24 24
25 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at>
26 ## Created: 24 December 1993
27 ## Adapted-By: jwe
28
25 function r = roots (v) 29 function r = roots (v)
26 30
27 ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Dec 24, 1993
28 ## Updated by KH on Nov 25, 1994
29
30 if (min (size (v)) > 1 || nargin != 1) 31 if (min (size (v)) > 1 || nargin != 1)
31 usage ("roots (v), where v is a vector"); 32 usage ("roots (v), where v is a vector");
32 endif 33 endif
33 34
34 n = length (v); 35 n = length (v);