Overview
| Comment: | Check and fix size of u0. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
153cb373e21d3034401b2d6e00d94ef0 |
| User & Date: | gawthrop@users.sourceforge.net on 1996-08-16 14:26:37.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1996-08-16
| ||
| 14:27:25 | Make a dummy function when no parameters (MTTNVar=0). check-in: 48861643d3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 14:26:37 | Check and fix size of u0. check-in: 153cb373e2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 14:26:07 |
Fixed multi-output bug. Made sure that u0 is ok. check-in: 0791ae253c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/dm2fr.m
from [4382f8c844]
to [72a8466d78].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | function fr = dm2fr(A,B,C,D,E,W,u0) % fr = dm2fr(A,B,C,D,E,W,u0) % Descriptor matrix to frequency response. % A,B,C,D,E - descriptor matrices % W vector of frequency points % u0 input gain vector: u = u0*unit phasor % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.3 1996/08/15 11:53:44 peter % %% Now has u0 input vector % %% % %% Revision 1.2 1996/08/15 10:24:28 peter % %% Includes u0 argument. % %% % %% Revision 1.1 1996/08/10 14:11:28 peter % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [Ny,Nu] = size(D); [Ny,Nx] = size(C); N = length(W); if nargin<7 | > > > | | > > > | > > > > > > > > > > > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
function fr = dm2fr(A,B,C,D,E,W,u0)
% fr = dm2fr(A,B,C,D,E,W,u0)
% Descriptor matrix to frequency response.
% A,B,C,D,E - descriptor matrices
% W vector of frequency points
% u0 input gain vector: u = u0*unit phasor
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.4 1996/08/15 12:50:51 peter
% %% Put in a conj to undo effect of transpose.
% %%
% %% Revision 1.3 1996/08/15 11:53:44 peter
% %% Now has u0 input vector
% %%
% %% Revision 1.2 1996/08/15 10:24:28 peter
% %% Includes u0 argument.
% %%
% %% Revision 1.1 1996/08/10 14:11:28 peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[Ny,Nu] = size(D);
[Ny,Nx] = size(C);
N = length(W);
if nargin<7
U0 = zeros(Nu,1);
U0(1) = 1;
else
for i=1:Nu
U0(i) = u0(i);
end;
end;
u0 = U0;
[n,m]=size(W);
if m>n
W=W';
end;
[n,m]=size(u0);
if m>n
u0=u0';
end;
fr = zeros(N,Ny);
i = 0;
for w = W'
i = i+1;
FR = C*( (E*j*w - A) \ B*u0 ) + D*u0
fr(i,:) = conj(FR');
end;
|
| ︙ | ︙ |