Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 9ed98b5ae526cee21ad3b876557d925697cd3afab834492c2f2d09d9d74d1646
User & Date: gawthrop@users.sourceforge.net on 1996-08-10 14:15:03
Other Links: branch diff | manifest | tags
Context
1996-08-10
14:16:04
Now has T vector input - it was tmax & tstep check-in: 555890dc62 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:15:03
Initial revision check-in: 9ed98b5ae5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:13:47
Added impulse and frequency response stuff. check-in: da50dc9881 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/dm2fr_m version [0f12f379c0].



















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: dm2fr_m2dat

# Transformation: descriptor matrix to frequency response

# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################

echo Creating $1_fr.dat

$MATRIX << EOF  | awk '$1 !~ /[A-Za-cf-z]/ && NF>0 {print} '  >$1_fr.dat

  W = logspace(-1,2,100);
  [A,B,C,D,E] = $1_dm;
  fr = dm2fr(A,B,C,D,E,W);

  rfr = real(fr);
  ifr = imag(fr);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [rfr(:,1), ifr(:,1)];
  for i=2:NN
    xy = [xy rfr(:,i) ifr(:,i)];
  end;
xy

EOF

Added mttroot/mtt/bin/trans/dm2ir_m2dat version [e42ebfadbe].

















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: dat2ps

# Tramsforms descriptor matrix rep to frequency response dat.


# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################

echo Creating $1_ir.dat

$MATRIX << EOF | awk '$1 !~ /[A-Za-z]/ && NF>0 {print} '  >$1_ir.dat

  tmax=2; tstep=tmax/100;
  T = [0:tstep:tmax]';
  [A,B,C,D,E] = $1_dm;
  y = dm2ir(A,B,C,D,E,T);

  [Ny,Nu]=size(D);
  NN = Ny*Nu;

  xy = [T y(:,1)];
  for i=2:NN
    xy = [xy T y(:,i)];
  end;
xy

EOF

Added mttroot/mtt/bin/trans/m/dm2fr.m version [97095c6b51].





















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
function  fr = dm2fr(A,B,C,D,E,W)
% fr = dm2fr(A,B,C,D,E,W)
% Descriptor matrix to frequency response.
% A,B,C,D,E - descriptor matrices
% W vector of frequency points


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

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


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