home *** CD-ROM | disk | FTP | other *** search
- function [g] = dclxbode(Z1,Z2,Z3,Z4,Z5,Z6,Z7)
- %
- % DBODE Bode response of discrete-time linear systems.
- %
- % [G] = DCLXBODE(SS_,IU,W,TS) or
- % [G] = DCLXBODE(A,B,C,D,IU,W,TS) calculates the frequency
- % response of the system:
- % x[n+1] = Ax[n] + Bu[n] -1
- % y[n] = Cx[n] + Du[n] G(z) = C(zI-A) B + D
- %
- % from the iu'th input. Vector W must contain the frequencies, in
- % radians, at which the Bode response is to be evaluated. DBODE returns
- % matrices MAG and PHASE (in degrees) with as many columns as there are
- % outputs y, and with LENGTH(W) rows.
- %
-
- % R. Y. Chiang & M. G. Safonov 6/23/87
- % Copyright (c) 1988 by the MathWorks, Inc.
- % All Rights Reserved.
- % ---------------------------------------------------------------------------
- %
-
- inargs = '(a,b,c,d,iu,w,Ts)';
- eval(mkargs(inargs,nargin,'ss'))
-
- [no,ns] = size(c);
- nw = max(size(w));
- b = b(:,iu);
- d = d(:,iu);
- w = exp(sqrt(-1) * w * Ts);
- g = ltifr(a,b,w);
- g = c * g + diag(d) * ones(no,nw);
- %
- % ------ End of DCLXBODE.M --- RYC/MGS 6/23/87 %