Mercurial > octave-nkf
comparison scripts/control/system/sysgettsam.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 |
---|---|
22 ## Return the sampling time of the system @var{sys}. | 22 ## Return the sampling time of the system @var{sys}. |
23 ## @end deftypefn | 23 ## @end deftypefn |
24 | 24 |
25 function T = sysgettsam (sys) | 25 function T = sysgettsam (sys) |
26 | 26 |
27 if (nargin != 1) | |
28 print_usage (); | |
29 endif | |
30 | |
27 if (! isstruct (sys)) | 31 if (! isstruct (sys)) |
28 print_usage (); | 32 error ("sysgettsam: expecting argument to be system structure"); |
29 endif | 33 endif |
30 | 34 |
31 T = sys.tsam; | 35 T = sys.tsam; |
32 | 36 |
33 endfunction | 37 endfunction |