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: 1d09ecef86b962ef53c19cffea18dcd34c48e424bf49e5955859696126f729ef
User & Date: gawthrop@users.sourceforge.net on 1998-01-12 09:59:33
Other Links: branch diff | manifest | tags
Context
1998-01-13
14:08:11
Initial revision check-in: fbe307f667 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-01-12
09:59:33
Initial revision check-in: 1d09ecef86 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:34:25
Initial revision check-in: 3e57693b0c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/can_r2tex version [b135c10fbf].



















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
43
44
45
46
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
93
94
95
96
97
98
99
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
134
135
136
137
#! /bin/sh

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

# Bourne shell script: sm_r2tex
# Reduce constrained-state matrices to LaTex constrained-state matrices.
# P.J.Gawthrop  9 Sep 1991, May 1994
# Copyright (c) P.J.Gawthrop, 1991, May 1994, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3  1997/06/13  13:50:11  peterg
# Matrices in amstex format
#
# Revision 1.2  1997/04/18  12:54:00  peterg
# No longer does labels.
#
# Revision 1.1  1996/08/19  15:19:23  peter
# Initial revision
#
###############################################################


# Inform user
echo Creating $1_sm.tex

# Remove the old log file
rm -f sm_r2tex.log

# Use reduce to accomplish the transformation
reduce >sm_r2tex.log << EOF

%Read the definitions file
in "$1_def.r";

%Read the constrained-state matrices file
in "$1_sm.r";

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

%Read the simplification file
in "$1_simp.r";


OFF Echo;
OFF Nat;
OFF EXP;
%ON Rounded;
%Precision 5;


OUT "$1_sm.tex";

%Write out the state matrices.
write "%state  matrices $1";
write "%File: $1.rcm";
write"";

write "%constrained-state matrices";

IF MTTNx>0 THEN
BEGIN
write "%  - A matrix";
write "\begin{equation}";
write "MTTA = \begin{pmatrix}";
	FOR Row := 1:MTTNx DO
	BEGIN
		FOR Col := 1:MTTNx DO
		BEGIN
			Write "{", MTTA(Row,Col), "}";
			IF Col<MTTNx THEN Write "&"
		END;

	IF Row<MTTNx THEN Write "\cr";
	END;
	Write "\end{pmatrix}";
write "\end{equation}";

write "%  - B matrix";
write "\begin{equation}";
write "MTTB = \begin{pmatrix}";
	FOR Row := 1:MTTNx DO
	BEGIN
		FOR Col := 1:MTTNu DO
		BEGIN
			Write "{", MTTB(Row,Col), "}";
			IF Col<MTTNu THEN Write "&"
		END;

	IF Row<MTTNx THEN Write "\cr";
	END;
	Write "\end{pmatrix}";
write "\end{equation}";

write "%  - C matrix";
write "\begin{equation}";
write "MTTC = \begin{pmatrix}";
	FOR Row := 1:MTTNy DO
	BEGIN
		FOR Col := 1:MTTNx DO
		BEGIN
			Write "{", MTTC(Row,Col), "}";
			IF Col<MTTNx THEN Write "&"
		END;

	IF Row<MTTNy THEN Write "\cr";
	END;
	Write "\end{pmatrix}";
write "\end{equation}";

END; %Nx>0

write "%  - D matrix";
write "\begin{equation}";
write "MTTD = \begin{pmatrix}";
	FOR Row := 1:MTTNy DO
	BEGIN
		FOR Col := 1:MTTNu DO
		BEGIN
			Write "{", MTTD(Row,Col), "}";
			IF Col<MTTNu THEN Write "&"
		END;

	IF Row<MTTNy THEN Write "\cr";
	END;
	Write "\end{pmatrix}";
write "\end{equation}";

SHUT "$1_sm.tex";
quit;
EOF


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