Differences From Artifact [97095c6b51]:

To Artifact [5190b9bd8e]:


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


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
-
-
+
+



-
+






+
+
+


+
+

-
-
+
+
+
+
+

-
+




-
+

+
+
+
+
+
+
+
+

function  fr = dm2fr(A,B,C,D,E,W)
% fr = dm2fr(A,B,C,D,E,W)
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.1  1996/08/10 14:11:28  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[Ny,Nu] = size(D);
[Ny,Nx] = size(C);
N = length(W);
[Ny,Nu] = size(D);
NN=Ny*Nu;

if nargin<7
  u0 = zeros(Nu,1);
  u0(1) = 1;
end;

fr = zeros(N,NN);
fr = zeros(N,Ny);
i = 0;
for w = W
  i = i+1;
  FR = C*( (E*j*w - A) \ B ) + D;
  fr(i,:) = reshape(FR,1,NN);
  fr(i,:) = FR';
end;










MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]