]> Creatis software - CreaPhase.git/blob - octave_packages/signal-1.1.3/ss2zp.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / signal-1.1.3 / ss2zp.m
1 ## Copyright (C) 1994, 1996, 2000, 2004, 2005, 2006, 2007 Auburn University
2 ## Copyright (C) 2012 Lukas F. Reichlin <lukas.reichlin@gmail.com>
3 ##
4 ## This program is free software; you can redistribute it and/or modify it under
5 ## the terms of the GNU General Public License as published by the Free Software
6 ## Foundation; either version 3 of the License, or (at your option) any later
7 ## version.
8 ##
9 ## This program is distributed in the hope that it will be useful, but WITHOUT
10 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 ## details.
13 ##
14 ## You should have received a copy of the GNU General Public License along with
15 ## this program; if not, see <http://www.gnu.org/licenses/>.
16
17 ## -*- texinfo -*-
18 ## @deftypefn {Function File} {[@var{pol}, @var{zer}, @var{k}] =} ss2zp (@var{a}, @var{b}, @var{c}, @var{d})
19 ## Converts a state space representation to a set of poles and zeros;
20 ## @var{k} is a gain associated with the zeros.
21 ##
22 ## @end deftypefn
23
24 ## Author: David Clem
25
26 function [z, p, k] = ss2zp (varargin)
27
28   if (nargin == 0)
29     print_usage ();
30   endif
31
32   [z, p, k] = zpkdata (ss (varargin{:}), "vector");
33
34 endfunction