Mercurial > hg > octave-terminal
changeset 4174:aabb8307021f
[project @ 2002-11-13 00:45:22 by jwe]
author | jwe |
---|---|
date | Wed, 13 Nov 2002 00:45:23 +0000 |
parents | 2aea727f516f |
children | b3cd3d12da7e |
files | scripts/ChangeLog scripts/control/base/lsim.m |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2002-11-12 John W. Eaton <jwe@bevo.che.wisc.edu> + * control/base/lsim.m: Use approximate test for step size change. + * signal/bartlett.m: Avoid row/column mismatch error. 2002-11-12 Paul Kienzle <pkienzle@users.sf.net>
--- a/scripts/control/base/lsim.m +++ b/scripts/control/base/lsim.m @@ -73,10 +73,13 @@ t(2)-t(1); u=u'; n = max(size(t)); + for ii = 1:(n-1) ## check if step size changed - if (t(ii+1) - t(ii) != Ts) + ## XXX FIXME XXX -- this is probably not the best test, but it is + ## better than a test for exact equality. + if (abs (t(ii+1) - t(ii) - Ts) > 10 * eps) Ts = t(ii+1) - t(ii); ## [F,G] = c2d(a,b,Ts); dsys = c2d(sys, Ts);