Mercurial > hg > octave-lyh
comparison scripts/control/system/is_detectable.m @ 7136:59dcf01bb3e3
[project @ 2007-11-08 20:18:25 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 20:18:26 +0000 |
parents | a1dbe9d80eee |
children | aeeb646f6538 |
comparison
equal
deleted
inserted
replaced
7135:8aa770b6c5bf | 7136:59dcf01bb3e3 |
---|---|
36 ## Created: August 1993 | 36 ## Created: August 1993 |
37 ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. | 37 ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. |
38 | 38 |
39 function [retval, U] = is_detectable (a, c, tol, dflg) | 39 function [retval, U] = is_detectable (a, c, tol, dflg) |
40 | 40 |
41 if( nargin < 1) | 41 if (nargin < 1) |
42 print_usage (); | 42 print_usage (); |
43 elseif(isstruct(a)) | 43 elseif (isstruct (a)) |
44 ## system form | 44 ## system form |
45 if(nargin == 2) | 45 if (nargin == 2) |
46 tol = c; | 46 tol = c; |
47 elseif(nargin > 2) | 47 elseif (nargin > 2) |
48 print_usage (); | 48 print_usage (); |
49 endif | 49 endif |
50 dflg = is_digital(a); | 50 dflg = is_digital (a); |
51 [a,b,c] = sys2ss(a); | 51 [a,b,c] = sys2ss (a); |
52 else | 52 else |
53 if ((nargin > 4)||(nargin == 1)) | 53 if (nargin > 4 || nargin == 1) |
54 print_usage (); | 54 print_usage (); |
55 endif | 55 endif |
56 if (~exist("dflg")) | 56 if (! exist ("dflg")) |
57 dflg = 0; | 57 dflg = 0; |
58 end | 58 endif |
59 end | 59 endif |
60 | 60 |
61 if(~exist("tol")) | 61 if (! exist ("tol")) |
62 tol = 200*eps; | 62 tol = 200*eps; |
63 end | 63 end |
64 retval = is_stabilizable(a',c',tol,dflg); | 64 |
65 retval = is_stabilizable (a', c', tol, dflg); | |
65 | 66 |
66 endfunction | 67 endfunction |
67 | 68 |