Differences From Artifact [e0cc0fae15]:

To Artifact [c980f7fdc8]:


10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993,1994.

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



# Revision 1.5  1997/02/24  14:44:28  peterg
# Ignores numerical parameters in global list.
#
## Revision 1.4  1996/08/24 14:16:25  peter
## Global parameter passing.
##
## Revision 1.3  1996/08/18 12:02:46  peter







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993,1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.6  1997/04/16  13:43:29  peterg
# Added matrix dimenensions
#
# Revision 1.5  1997/02/24  14:44:28  peterg
# Ignores numerical parameters in global list.
#
## Revision 1.4  1996/08/24 14:16:25  peter
## Global parameter passing.
##
## Revision 1.3  1996/08/18 12:02:46  peter
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%Read in the definitions file
in "$1_def.r";

%Set up the number of argument variables to zero in case the user has forgotten
MTTNVar := 0;

%Read in the parameter file
in "$1_sympar.r";

%Read the reduce state-space A,B,C and D matrices file
in "$1_dm.r";

IF MTTNvar>0 THEN
BEGIN
  write "% Set the parameters";







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%Read in the definitions file
in "$1_def.r";

%Set up the number of argument variables to zero in case the user has forgotten
MTTNVar := 0;

%Read in the parameter file
%%in "$1_sympar.r";

%Read the reduce state-space A,B,C and D matrices file
in "$1_dm.r";

IF MTTNvar>0 THEN
BEGIN
  write "% Set the parameters";
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
MTTE := MTTE;

SHUT "$1_dm.1";


EOF

#Write some file headers
echo "function [A,B,C,D,E] = $1_dm" > $1_dm.m
echo "% Descriptor matrix function for system $1 ($1_dm.m)"   >> $1_dm.m
echo "% Generated by MTT at `date`"  >> $1_dm.m
echo  >> $1_dm.m

#Globals
sympar2global_txt2m $1 >> $1_dm.m
echo  ';'>> $1_dm.m
echo  >> $1_dm.m

#Define array sizes.
grep -v 'function' $1_def.m | grep -v '%' >>  $1_dm.m
echo 'mtta = zeros(nx+nyz,nx+nyz);' >>  $1_dm.m
echo 'mttb = zeros(nx+nyz,nu);' >>  $1_dm.m
echo 'mttc = zeros(ny,nx+nyz);' >>  $1_dm.m
echo 'mttd = zeros(nu,nu);' >>  $1_dm.m
echo 'mtte = zeros(nx+nyz,nx+nyz);' >>  $1_dm.m


#Code
cat $1_dm.1 >> $1_dm.m


rm -f $1_dm.1









<
<
<
<
<
|
<
<
<
|



|
|
|
|
|









103
104
105
106
107
108
109





110



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
MTTE := MTTE;

SHUT "$1_dm.1";


EOF






# Header



matlab_header $1 dm> $1_dm.m

#Define array sizes.
grep -v 'function' $1_def.m | grep -v '%' >>  $1_dm.m
echo 'mtta = zeros(nx+nyz+2*nz,nx+nyz+2*nz);' >>  $1_dm.m
echo 'mttb = zeros(nx+nyz+2*nz,nu);' >>  $1_dm.m
echo 'mttc = zeros(ny,nx+nyz+2*nz);' >>  $1_dm.m
echo 'mttd = zeros(ny,nu);' >>  $1_dm.m
echo 'mtte = zeros(nx+nyz+2*nz,nx+nyz+2*nz);' >>  $1_dm.m


#Code
cat $1_dm.1 >> $1_dm.m


rm -f $1_dm.1



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