comparison scripts/control/is_detectable.m @ 3228:dbcc24961c44

[project @ 1998-12-09 18:42:12 by jwe]
author jwe
date Wed, 09 Dec 1998 18:42:13 +0000
parents ba1c7cdc6090
children 28aba52a2368
comparison
equal deleted inserted replaced
3227:e090571062ee 3228:dbcc24961c44
29 # 29 #
30 # See also: size, rows, columns, length, is_matrix, is_scalar, is_vector. 30 # See also: size, rows, columns, length, is_matrix, is_scalar, is_vector.
31 31
32 # Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. 32 # Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993.
33 # Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. 33 # Updated by John Ingram (ingraje@eng.auburn.edu) July 1996.
34 # SYS_INTERNAL accesses members of system structure 34 # $Revision: 2.0.0.0 $
35 # $Revision: 1.1.1.1 $
36 35
37 if( nargin < 1) 36 if( nargin < 1)
38 usage("[retval,U] = is_detectable(a , c {, tol})"); 37 usage("[retval,U] = is_detectable(a , c {, tol})");
39 elseif(is_struct(a)) 38 elseif(is_struct(a))
40 # system form 39 # system form
41 if(nargin == 2) 40 if(nargin == 2)
42 tol = c; 41 tol = c;
43 elseif(nargin > 2) 42 elseif(nargin > 2)
44 usage("[retval,U] = is_detectable(sys {, tol})"); 43 usage("[retval,U] = is_detectable(sys {, tol})");
45 endif 44 endif
46 a = sysupdate(a,"ss"); 45 [a,b,c] = sys2ss(a);
47 c = a.c;
48 a = a.a;
49 elseif(nargin > 3) 46 elseif(nargin > 3)
50 usage("[retval,U] = is_detectable(a , c {, tol})"); 47 usage("[retval,U] = is_detectable(a , c {, tol})");
51 endif 48 endif
52 if(exist("tol")) 49 if(exist("tol"))
53 [retval,U] = is_stabilizable (a', c', tol); 50 [retval,U] = is_stabilizable (a', c', tol);