3441
|
1 ## Copyright (C) 1993, 1994, 1995 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 |
|
6 ## under the terms of the GNU General Public License as published by the |
|
7 ## Free Software Foundation; either version 2, or (at your option) any |
|
8 ## later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but WITHOUT |
|
11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 ## for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. |
|
18 |
|
19 ## -*- texinfo -*- |
3502
|
20 ## @deftypefn {Function File} {[@var{retval}, @var{u}] =} is_detectable (@var{a}, @var{c}, @var{tol}) |
|
21 ## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} is_detectable (@var{sys}, @var{tol}) |
3441
|
22 ## Test for detactability (observability of unstable modes) of |
|
23 ## (@var{a},@var{c}). |
|
24 ## |
|
25 ## Returns 1 if the system @var{a} or the pair (@var{a},@var{c})is |
|
26 ## detectable, 0 if not. |
|
27 ## |
|
28 ## @strong{See} @code{is_stabilizable} for detailed description of |
|
29 ## arguments and computational method. |
|
30 ## |
|
31 ## Default: tol = 10*norm(a,'fro')*eps |
|
32 ## |
|
33 ## @end deftypefn |
|
34 ## @seealso{is_stabilizable, size, rows, columns, length, is_matrix, |
|
35 ## is_scalar, and is_vector} |
|
36 |
|
37 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> |
|
38 ## Created: August 1993 |
|
39 ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. |
|
40 |
|
41 function [retval, U] = is_detectable (a, c, tol) |
|
42 |
|
43 if( nargin < 1) |
|
44 usage("[retval,U] = is_detectable(a , c {, tol})"); |
|
45 elseif(is_struct(a)) |
|
46 ## system form |
|
47 if(nargin == 2) |
|
48 tol = c; |
|
49 elseif(nargin > 2) |
|
50 usage("[retval,U] = is_detectable(sys {, tol})"); |
|
51 endif |
|
52 [a,b,c] = sys2ss(a); |
|
53 elseif(nargin > 3) |
|
54 usage("[retval,U] = is_detectable(a , c {, tol})"); |
|
55 endif |
|
56 if(exist("tol")) |
|
57 [retval,U] = is_stabilizable (a', c', tol); |
|
58 else |
|
59 [retval,U] = is_stabilizable (a', c'); |
|
60 endif |
|
61 |
|
62 |
|
63 endfunction |
|
64 |