Differences From Artifact [e0e9130b2d]:

To Artifact [439cd48f13]:


12
13
14
15
16
17
18




19
20
21
22
23
24
25

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




# Revision 1.7  1996/08/30  11:29:49  peter
# Added constitutive relationship to argument list.
# Put in explicit argument list to cbg2ese.
#
# Revision 1.6  1996/08/26  13:25:07  peterg
# Corrected error handling.
#







>
>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.8  1996/12/05 10:05:28  peterg
## Removed the Octave switch: empty_list_elements_ok = 1;
## This is now in .octaverc
##
# Revision 1.7  1996/08/30  11:29:49  peter
# Added constitutive relationship to argument list.
# Put in explicit argument list to cbg2ese.
#
# Revision 1.6  1996/08/26  13:25:07  peterg
# Corrected error handling.
#
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
infofile='mtt_info.txt';
eqnfile="$1_ese.r";
deffile="$1_def.r";

# Remove the old log file
rm -f cbg2ese_m.log
rm -f $1_ese.r
rm -f $1_def.r
rm -f $infofile

touch $infofile

#Inform user
echo Creating $eqnfile
echo Creating $1_def.r

# Use matrix manipulation to accomplish the transformation
$RMATRIX > cbg2ese_m2r.log 2>mtt_error.txt << EOF

infofile = '$infofile';;




system_name = '$1';
system_type = '';
system_cr = '';
system_args = '';
full_name = '';
full_name_repetition = '';

deffile = '$1_def.r';

% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

structure = zeros(1,5);

structure = cbg2ese(system_name, system_type, system_cr, ...
                     system_args, full_name, full_name_repetition, ...
                     1, structure, infofile);
makedef(structure,deffile);
  
EOF

cat $infofile

cat $1*ese.r - > $1_ese.tmp 2>> mtt_error.txt <<EOF
END;







<
<
<
<









>
>
>
>







<







|
|







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
infofile='mtt_info.txt';
eqnfile="$1_ese.r";
deffile="$1_def.r";

# Remove the old log file
rm -f cbg2ese_m.log
rm -f $1_ese.r





#Inform user
echo Creating $eqnfile
echo Creating $1_def.r

# Use matrix manipulation to accomplish the transformation
$RMATRIX > cbg2ese_m2r.log 2>mtt_error.txt << EOF

infofile = '$infofile';;
infofilenum = fopen(infofile,'w');
deffile = '$1_def.r';
deffilenum = fopen(deffile,'w');

system_name = '$1';
system_type = '';
system_cr = '';
system_args = '';
full_name = '';
full_name_repetition = '';



% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

structure = zeros(1,5);

structure = cbg2ese(system_name, system_type, system_cr, ...
                     system_args, full_name, full_name_repetition, ...
                     1, structure, infofilenum);
makedef(structure,deffilenum);
  
EOF

cat $infofile

cat $1*ese.r - > $1_ese.tmp 2>> mtt_error.txt <<EOF
END;

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