Mercurial > octave-nkf
comparison scripts/control/base/impulse.m @ 7126:4a375de63f66
[project @ 2007-11-08 03:44:14 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 03:44:15 +0000 |
parents | a1dbe9d80eee |
children | 1d0d7be2d0f8 |
comparison
equal
deleted
inserted
replaced
7125:f084ba47812b | 7126:4a375de63f66 |
---|---|
54 ## based on lsim.m of Scottedward Hodel | 54 ## based on lsim.m of Scottedward Hodel |
55 ## modified by | 55 ## modified by |
56 | 56 |
57 function [y, t] = impulse (sys, inp, tstop, n) | 57 function [y, t] = impulse (sys, inp, tstop, n) |
58 | 58 |
59 if ((nargin < 1) || (nargin > 4)) | 59 if (nargin < 1 || nargin > 4 || nargout > 2) |
60 print_usage (); | |
61 endif | |
62 | |
63 if (nargout > 2) | |
64 print_usage (); | 60 print_usage (); |
65 endif | 61 endif |
66 | 62 |
67 if (! isstruct (sys)) | 63 if (! isstruct (sys)) |
68 error ("impulse: sys must be a system data structure."); | 64 error ("impulse: sys must be a system data structure."); |