Differences From Artifact [443b4828f1]:

To Artifact [2cb9afaa60]:


10
11
12
13
14
15
16



17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26







+
+
+







# Copyright (c) P.J.Gawthrop, 1990, 1993.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2001/05/24 07:42:12  gawthrop
## Included and updated the missing tf_r2m
##
## Revision 1.1  1996/09/18 14:05:31  peter
## Initial revision
##
###############################################################

#Inform user
echo Creating $1_tf.m
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111







-
+










+







%Find the corresponding numerator
matrix MTTnum(MTTNy,MTTNu);
  FOR Row := 1:MTTNy DO
  BEGIN
    FOR Col := 1:MTTNu DO
    MTTnum(Row,Col) := num(MTTtf(Row,Col))*(MTTden/den(MTTtf(Row,Col)));
  END;
MTTnum;
MTTnum := MTTnum;

%Put coefficients into matrices
matrix MTTdenco(1,Nmax);
MTTCoeff := Coeff(MTTden,s);
FOR i := 1:Nmax DO
BEGIN
  j := Nmax-i+1;
  IF j>length(MTTCoeff) THEN MTTdenco(1,i) := 0 
                        ELSE MTTdenco(1,i) := part(MTTCoeff,j);
END; 
MTTdenco := MTTdenco;

matrix MTTnumco(MTTNy,MTTNu*Nmax);
FOR MTTRow := 1:MTTNy DO
BEGIN
  FOR MTTCol := 1:MTTNu DO
  BEGIN
    MTTCoeff := Coeff(MTTnum(MTTRow,MTTCol),s);
141
142
143
144
145
146
147
148
149
150
151
145
146
147
148
149
150
151
152











-
-
-
#Headers
mtt_header $1 tf m > $1_tf.m

#Body
cat $1_tf.m1  >> $1_tf.m
echo '## END Code' >> $1_tf.m
rm -f $1_tf.m1





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