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
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Copyright (c) P.J.Gawthrop, 1997.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 2001/03/19 02:28:52 geraint
## Branch merge: merging-ode2odes-exe back to MAIN.
##
## Revision 1.1.2.1 2001/03/06 03:52:15 geraint
## Put back struc_txt2m - required by mtt2sys.
##
###############################################################
# Inform user
echo "Creating $1_struc.m"
rm -f mtt_error
#Write some file headers
echo "function [input_name,output_name,state_name] = $1_struc" > $1_struc.m
echo "%% Structure file ($1_struc.m)" >> $1_struc.m
echo "%% Generated by MTT at `date`" >> $1_struc.m
cat >> $1_struc.m <<EOF
## Default to null strings
input_name = "";
output_name = "";
state_name = "";
EOF
# This is the main transformation using awk
awk '
function header(what){
print what "_name = [";
}
|