Mercurial > hg > octave-lyh
comparison scripts/control/system/is_observable.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 |
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_observable (a, c, tol) | 39 function [retval, U] = is_observable (a, c, tol) |
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 [a,b,c] = sys2ss(a); | 50 [a, b, c] = sys2ss (a); |
51 elseif(nargin > 3) | 51 elseif (nargin > 3) |
52 print_usage (); | 52 print_usage (); |
53 endif | 53 endif |
54 if(exist("tol")) | 54 if (exist ("tol")) |
55 [retval,U] = is_controllable (a', c', tol); | 55 [retval, U] = is_controllable (a', c', tol); |
56 else | 56 else |
57 [retval,U] = is_controllable (a', c'); | 57 [retval, U] = is_controllable (a', c'); |
58 endif | 58 endif |
59 | 59 |
60 endfunction | 60 endfunction |
61 | 61 |