Mercurial > hg > octave-lyh
diff scripts/control/tzero.m @ 1337:52a3f38cbfeb
[project @ 1995-08-25 02:00:18 by jwe]
author | jwe |
---|---|
date | Fri, 25 Aug 1995 02:16:01 +0000 |
parents | 611d403c7f3d |
children | 5d29638dd524 |
line wrap: on
line diff
--- a/scripts/control/tzero.m +++ b/scripts/control/tzero.m @@ -41,20 +41,20 @@ warning ("tzero: number of inputs,outputs differ. squaring up"); if (p > m) warning (" by padding b and d with zeros."); - b = [b, zeros (n, p-m)]; - d = [d, zeros (p, p-m)]; + b = [b, (zeros (n, p-m))]; + d = [d, (zeros (p, p-m))]; m = p; else warning (" by padding c and d with zeros."); - c = [c; zeros (m-p, n)]; - d = [d; zeros (m-p, m)]; + c = [c; (zeros (m-p, n))]; + d = [d; (zeros (m-p, m))]; p = m; endif warning ("This is a kludge. Try again with SISO system."); endif ab = [-a, -b; c, d]; - bb = [eye (n), zeros (n, m); zeros (p, n), zeros (p, m)]; - [ab,bb] = balance (ab, bb); + bb = [(eye (n)), (zeros (n, m)); (zeros (p, n)), (zeros (p, m))]; + [ab, bb] = balance (ab, bb); zr = -qzval (ab, bb); else error ("tzero: a, b, c, d not compatible");