comparison scripts/control/system/sysgettype.m @ 7125:f084ba47812b

[project @ 2007-11-08 02:29:23 by jwe]
author jwe
date Thu, 08 Nov 2007 02:29:24 +0000
parents a1dbe9d80eee
children
comparison
equal deleted inserted replaced
7124:d07cb867891b 7125:f084ba47812b
37 ## @acronym{FIR} initialized systems return @code{systype="tf"}. 37 ## @acronym{FIR} initialized systems return @code{systype="tf"}.
38 ## @end deftypefn 38 ## @end deftypefn
39 39
40 function systype = sysgettype (sys) 40 function systype = sysgettype (sys)
41 41
42 if (nargin != 1)
43 print_usage ();
44 endif
45
42 if (! isstruct (sys)) 46 if (! isstruct (sys))
43 error ("sysgettype: input sys is not a structure"); 47 error ("sysgettype: input sys is not a structure");
44 endif 48 endif
45 49
46 typestr = {"tf", "zp", "ss"}; 50 typestr = {"tf", "zp", "ss"};
47 systype = typestr{ sys.sys(1) + 1}; 51 systype = typestr{sys.sys(1) + 1};
48 52
49 endfunction 53 endfunction