Overview
Comment:Removed parameter stuff
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 4e927073f2ed473e62b22aea4ccc83775e719dab86ebfa9c402062d333413cbb
User & Date: gawthrop@users.sourceforge.net on 1998-02-26 15:12:26
Other Links: branch diff | manifest | tags
Context
1998-03-02
09:26:18
Now does default CR and args for the basic components only
SS,I,R,C,GY,TF
C now has a default of effort input.
check-in: a94d103cda user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-02-26
15:12:26
Removed parameter stuff check-in: 4e927073f2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:21:51
Revised to take account of new (??) wc output - now echos the file
name (??)
check-in: d20849d6d2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/dm2fr_m from [646c7cb58f] to [e1232d03cf].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop, 1996.

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



## Revision 1.7  1996/08/24  14:23:00  peter
## Global parameter passing.
## Proper error handling.
#
## Revision 1.6  1996/08/16 14:26:07  peter
## Fixed multi-output bug.
## Made sure that u0 is ok.







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.8  1996/08/30  14:54:36  peter
# Took back lock.
#
## Revision 1.7  1996/08/24  14:23:00  peter
## Global parameter passing.
## Proper error handling.
#
## Revision 1.6  1996/08/16 14:26:07  peter
## Fixed multi-output bug.
## Made sure that u0 is ok.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80
81
82
83





84
85
86
87
88
89
90
91
92

echo Creating $1_fr.m
echo Creating $1_lmfr.m
echo Creating $1_lpfr.m
echo Creating $1_nyfr.m
echo Creating $1_nifr.m

if [ "$2" = "" ]; 
then
  PARAMS='W=logspace(-1,2,100); u0=zeros(nu,1); u0(1)=1;'
  echo Using default parameter $PARAMS
else
  PARAMS=$2;
fi

$MATRIX << EOF > dm2fr_m.log 2>mtt_error

  $1_numpar;

  [nx,ny,nu,nz,nyz] = $1_def;
  $PARAMS

  %Defaults
  if exist('W')==0
    W = logspace(-1,2,100)';
  end;

  if exist('u0')==0
    u0 = zeros(nu,1);
    u0(1) = 1;
  end;


  [n,m]=size(W);
  if m>n
    W=W';
  end;






  [A,B,C,D,E] = $1_dm;
  fr = dm2fr(A,B,C,D,E,W,u0);
  lw = log10(W);
  lmfr = log10(abs(fr));
  pfr = angle(fr)*180/pi;

% Complex frequency response
  write_matrix([W fr], '$1_fr');








|
|
|
|
|
|
|

|



|
|










>






>
>
>
>
>
|
|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

echo Creating $1_fr.m
echo Creating $1_lmfr.m
echo Creating $1_lpfr.m
echo Creating $1_nyfr.m
echo Creating $1_nifr.m

#if [ "$2" = "" ]; 
#then
#  PARAMS='W=logspace(-1,2,100); u0=zeros(nu,1); u0(1)=1;'
#  echo Using default parameter $PARAMS
#else
#  PARAMS=$2;
#fi

$MATRIX << EOF > dm2fr_m.log 2>mtt_error.txt

  $1_numpar;

  [nx,ny,nu,nz,nyz] = $1_def
%  $PARAMS

  %Defaults
  if exist('W')==0
    W = logspace(-1,2,100)';
  end;

  if exist('u0')==0
    u0 = zeros(nu,1);
    u0(1) = 1;
  end;


  [n,m]=size(W);
  if m>n
    W=W';
  end;

  [n,m]=size(u0);
  if m>n
    u0=u0';
  end;

  [A,B,C,D,E] = $1_dm
  fr = dm2fr(A,B,C,D,E,W,u0)
  lw = log10(W);
  lmfr = log10(abs(fr));
  pfr = angle(fr)*180/pi;

% Complex frequency response
  write_matrix([W fr], '$1_fr');

113
114
115
116
117
118
119
120
121
122
123
124
125
126
    nic = [nic im(:,i) re(:,i)]
  end;
  write_matrix(nic, '$1_nifr');

EOF

# Now invoke the standard error handling.
mtt_error_r dae2dm_r.log













|






122
123
124
125
126
127
128
129
130
131
132
133
134
135
    nic = [nic im(:,i) re(:,i)]
  end;
  write_matrix(nic, '$1_nifr');

EOF

# Now invoke the standard error handling.
mtt_error mtt_error.txt







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