3381
|
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. |
3213
|
18 |
3346
|
19 ## -*- texinfo -*- |
|
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}@}) |
|
22 ## Test for detactability (observability of unstable modes) of (@var{a},@var{c}). |
|
23 ## |
|
24 ## Returns 1 if the system @var{a} or the pair (@var{a},@var{c})is |
|
25 ## detectable, 0 if not. |
|
26 ## |
|
27 ## @strong{See} @code{is_stabilizable} for detailed description of arguments and |
|
28 ## computational method. |
|
29 ## |
|
30 ## Default: tol = 10*norm(a,'fro')*eps |
|
31 ## |
|
32 ## @end deftypefn |
3213
|
33 |
3346
|
34 ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector. |
3213
|
35 |
3346
|
36 function [retval,U] = is_detectable (a,c,tol) |
3381
|
37 |
|
38 ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. |
|
39 ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. |
3213
|
40 |
|
41 if( nargin < 1) |
|
42 usage("[retval,U] = is_detectable(a , c {, tol})"); |
|
43 elseif(is_struct(a)) |
3381
|
44 ## system form |
3213
|
45 if(nargin == 2) |
|
46 tol = c; |
|
47 elseif(nargin > 2) |
|
48 usage("[retval,U] = is_detectable(sys {, tol})"); |
|
49 endif |
3228
|
50 [a,b,c] = sys2ss(a); |
3213
|
51 elseif(nargin > 3) |
|
52 usage("[retval,U] = is_detectable(a , c {, tol})"); |
|
53 endif |
|
54 if(exist("tol")) |
|
55 [retval,U] = is_stabilizable (a', c', tol); |
|
56 else |
|
57 [retval,U] = is_stabilizable (a', c'); |
|
58 endif |
|
59 |
|
60 |
|
61 endfunction |
|
62 |