comparison scripts/polynomial/polyder.m @ 5216:5ed60b8b1ac4

[project @ 2005-03-16 19:51:39 by jwe]
author jwe
date Wed, 16 Mar 2005 19:51:46 +0000
parents d25bc039237b
children e88886a6934d
comparison
equal deleted inserted replaced
5215:32c569794216 5216:5ed60b8b1ac4
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA. 18 ## 02111-1307, USA.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} polyder (@var{c}) 21 ## @deftypefn {Function File} {} polyder (@var{c})
22 ## @deftypefnx {Function File} {[@var{q}] =} polyder (@var{b}, @var{a})
23 ## @deftypefnx {Function File} {[@var{q}, @var{r}] =} polyder (@var{b}, @var{a})
22 ## See polyderiv. 24 ## See polyderiv.
23 ## @end deftypefn 25 ## @end deftypefn
24 26
25 ## Author: jwe 27 ## Author: John W. Eaton
28 ## Paul Kienzle <pkienzle@kienzle.powernet.co.uk>
29 ## handle b/a and b*a
26 30
27 function q = polyder (p) 31 function [q, r] = polyder (p, a)
28 32
29 if (nargin == 1) 33 if (nargin == 1)
30 q = polyderiv (p); 34 q = polyderiv (p);
35 elseif (nargin==2)
36 if (nargout==2)
37 [q, r] = polyderiv (p,a);
38 else
39 q = polyderiv (p,a);
40 endif
31 else 41 else
32 usage ("polyder (vector)"); 42 usage ("q=polyder(p) or q=polyder(b,a) or [q, r]=polyder(b,a)");
33 endif 43 endif
34 44
35 endfunction 45 endfunction