3431
|
1 ## Copyright (C) 1996 Auburn University. All rights reserved. |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
7016
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
3431
|
9 ## |
7016
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
3431
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
3431
|
18 |
|
19 ## -*- texinfo -*- |
3500
|
20 ## @deftypefn {Function File} {} is_siso (@var{sys}) |
5016
|
21 ## Returns nonzero if the system data structure |
3431
|
22 ## @var{sys} is single-input, single-output. |
|
23 ## @end deftypefn |
|
24 |
|
25 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> |
|
26 ## Created: July 1996, 1998 |
|
27 |
|
28 function SISO = is_siso (sys) |
|
29 |
4462
|
30 if (nargin != 1) |
6046
|
31 print_usage (); |
4462
|
32 elseif (! isstruct (sys)) |
4771
|
33 error ("input must be a system structure (see ss, tf, zp)"); |
3431
|
34 endif |
|
35 |
4462
|
36 [n, nz, m, p] = sysdimensions (sys); |
3431
|
37 |
4462
|
38 SISO = (m == 1 && p == 1); |
3431
|
39 |
|
40 endfunction |