Comment: | Fixed [ 549658 ] awk should be gawk. Replaced calls to awk with call to gawk. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
66bb5feadf43c0952c9b34dde3a07c2a |
User & Date: | geraint@users.sourceforge.net on 2002-04-28 18:41:27 |
Other Links: | branch diff | manifest | tags |
2002-04-28
| ||
18:58:07 |
Fixed [ 549658 ] awk should be gawk. Replaced calls to awk with call to gawk. check-in: 636df344ed user: geraint@users.sourceforge.net tags: origin/master, trunk | |
18:41:27 |
Fixed [ 549658 ] awk should be gawk. Replaced calls to awk with call to gawk. check-in: 66bb5feadf user: geraint@users.sourceforge.net tags: origin/master, trunk | |
15:38:06 | New argument to add zero columns -- useful if less basis functions than inputs check-in: 80a14a1b06 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Modified mttroot/mtt/bin/mtt from [0fc79c2700] to [1cae376587].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.332 2002/04/26 23:19:00 geraint ## Fixed path to info files for "mtt info". ## ## Revision 1.331 2002/04/19 09:24:29 gawthrop ## 2 changes to ode2odes_out generation: only compiles the specified c ## file; outside the computation=c clause ## ## Revision 1.330 2002/04/17 10:03:12 geraint ## Marked .sg as a major representation. ## |
︙ | |||
1532 1533 1534 1535 1536 1537 1538 | 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 | - + | rm -fr MTT_work exit fi # Recursively clean up if [ "$1" = "rclean" ]; then echo 'Removing intermediate files recursively' |
︙ | |||
1619 1620 1621 1622 1623 1624 1625 | 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 | - + | documenttype=article # See if we are making a book -- ie representation rep on a directory isMTT_work=`pwd | grep 'MTT_work'` if [ -n "$isMTT_work" ]; then dotdot='../' fi |
︙ | |||
1715 1716 1717 1718 1719 1720 1721 | 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 | - + | echo Component $name exists already - no action taken fi else if [ $source = "." ]; then cp -u *_*.* ${destination} else comp_path=`mtt_find $source $2 path_only` |
︙ | |||
2030 2031 2032 2033 2034 2035 2036 | 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 | - + | if [ -n "$sensitivity" ]; then sys_s=`echo $1 | cut -c 2-` sys_abg=${sys_s}_abg fi ## Check octave version |
︙ |
Modified mttroot/mtt/bin/mtt_backup from [c4fb75f9d6] to [390999ad3b].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + | mtt="mtt-$1" dirs=$mtt fi ## Create appropriate filename case $format in date) |
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + | exit fi # Listing files to ignore #echo Finding irrelevant files #find $dirs -name '*.*' -print |\ # grep 'dvi$\|ps$\|gif$\|log$\|dat$\|MTT_work\|core\|~$' >IGNORE |
Modified mttroot/mtt/bin/mtt_find from [f98e05dd96] to [a16165e9f1].
︙ | |||
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 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.7 2000/10/03 18:29:57 peterg ## *** empty log message *** ## ## Revision 1.6 1998/07/17 19:47:35 peterg ## Minor changes ## ## Revision 1.5 1998/07/17 07:50:33 peterg ## Now handles library name ## Returns a status ## 0 if exactly one result |
︙ | |||
98 99 100 101 102 103 104 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + | fi find $thepath -maxdepth 1 -name $fullname -printf $format; done |\ tee mtt_junk fi # Check exit status and return |
︙ |
Modified mttroot/mtt/bin/mtt_help from [67aeffb88f] to [92a6751c3c].
︙ | |||
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 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.14 2000/10/03 18:29:26 peterg ## crs now works after a fashion ## ## Revision 1.13 2000/04/04 15:22:44 peterg ## Major changes: simple components now work ## Single components now work ## ## Revision 1.12 1998/07/21 08:47:59 peterg ## Default null $2 (regexp) to '^' - ie match any line ## |
︙ | |||
146 147 148 149 150 151 152 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - + - + - + - + | echo $comment $blurb mtt2reps_txt ;; crs) echo $comment $blurb find $find_path -name "$name" -print |\ |
︙ |
Modified mttroot/mtt/bin/mtt_versions from [4c7a6f1126] to [a20bb12cc7].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 2000/11/13 21:40:26 peterg ## Sorted out the non-gnu ## ## Revision 1.1 1998/05/28 09:24:41 peterg ## Initial revision ## ############################################################### echo Versions of mtt and its components on `date` ## gnu standard --version mtt_version mtt echo Doing the GNU components |
︙ |
Modified mttroot/mtt/bin/mttrc from [5f2c0006b7] to [e928afb320].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.26 2002/04/26 16:16:33 geraint ## Removed unnecessary variables PLAT and GCCVERS. ## ## Revision 1.25 2002/04/02 09:16:39 geraint ## Tidied up library search paths, now assumes that system libraries are set up correctly. ## For Debian, this means installing the following: blas-dev, fftw-dev, lapack-dev, libncurses5-dev, libkpathsea-dev, libreadline-dev ## It may also be necessary to run /sbin/ldconfig on the relevant directories (especially Octave's). ## ## Revision 1.24 2001/10/15 14:28:35 gawthrop ## Now has . at start of components library path $MTT_COMPONENTS |
︙ | |||
189 190 191 192 193 194 195 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | - + | # include paths IOCTAVE="-I${PREFIX}/include/octave/ -I${PREFIX}/include/octave/octave" # library paths |
︙ |
Modified mttroot/mtt/bin/trans/ICD_txt2lang.sh from [456d58a25f] to [9756a243af].
︙ | |||
27 28 29 30 31 32 33 | 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 | - + - + - + - + - + - + | # $1 $2 $3 $4 $5 $6 $7 cat <<EOF >> ${ICD} ${comment} Inputs EOF |
Modified mttroot/mtt/bin/trans/abg2cr_m2txt from [8b839d7a30] to [6c927fa6eb].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | rm -f mtt_error # This is the main transformation using awk # And remove crs with same name as system |
︙ |
Modified mttroot/mtt/bin/trans/abg2lbl_fig2txt from [3e21c7fb36] to [67d597485a].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Acausal bond graph to causal bond graph: mfile format ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.25 2001/10/15 14:27:00 gawthrop ## Now handles [1:N] style port labels ## ## Revision 1.24 2001/08/02 03:24:48 geraint ## Replaced mtt_version.sh with mtt_banner.sh - I think this was the intent. ## ## Revision 1.23 2001/07/26 04:08:35 gawthrop ## Removed lines deleting _type.sh and cbg.m ## -- how did they get there ?? ## |
︙ | |||
170 171 172 173 174 175 176 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + - + | } create_lbl_body() { ## Find names of all components grep -v '\[[0-9]*:[0-9]*\]' $1_abg.fig |\ |
︙ | |||
301 302 303 304 305 306 307 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - + | create_arg_aliases() { cat <<EOF ## Argument aliases EOF abg2sympar_m2txt ${system} ${system} use_label_file |\ |
︙ |
Modified mttroot/mtt/bin/trans/abg2sabg_fig from [b4a5f4fe24] to [42ae42721b].
︙ | |||
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 | 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 | + + + - + | # Acausal bond graph to causal bond graph: mfile format ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2000/12/28 12:18:40 peterg ## Initial revision ## ############################################################### # P.J.Gawthrop March 1997 # Copyright (c) P.J.Gawthrop, 1997 infofile='mtt_info.txt' typefile="$1_type.sh" # Remove the old log file rm -f abg2sabg_fig.log rm -f $1_cbg.m rm -f $typefile rm -f $infofile #Inform user echo Creating $1_sabg.txt |
Modified mttroot/mtt/bin/trans/abg2sensitivity_fig from [868b237a9b] to [019c577d2e].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | echo "Looking for $1 in library" mtt -q compcopy $1 fi echo Creating $sfilename |
︙ |
Modified mttroot/mtt/bin/trans/abg2sub_fig2sh from [a2d914eff3] to [aa4b28a58d].
︙ | |||
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 | 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 | + + + - + | ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 2002/04/22 10:25:47 gawthrop ## Handles unnamed components & ingnores artwork ## ## Revision 1.3 2001/10/15 14:27:34 gawthrop ## Now handles [1:N] style port labels ## ## Revision 1.2 2001/07/23 23:26:23 gawthrop ## Removed some boring user feedback ## ## Revision 1.1 2001/06/11 19:47:49 gawthrop ## Makes the sub.sh file directly from the abg.fig file ## Used for making lbl files (abg2lbl_fig2txt) ## ## ############################################################### # Copyright (C) 1996--2002 by Peter J. Gawthrop get_valid_components() { |
︙ | |||
65 66 67 68 69 70 71 | 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 | - + - + - + - + | echo "# Generated by MTT on `date`." >> $1_sub.sh echo >> $1_sub.sh # Get a list of all components from the _abg file get_valid_components $1 |\ grep -v '\[[0-9]*:[0-9]*\]' |\ grep -v '\[.*\]' |\ |
Modified mttroot/mtt/bin/trans/abg2sub_m2sh from [bfd41abfe9] to [2502a0a331].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 2000/10/03 11:34:53 peterg ## Correct $MTT_LIB ## ## Revision 1.2 2000/03/17 09:53:10 peterg ## Removed irritating echo Using "$1_sub.sh" ## ## Revision 1.1 2000/03/15 21:23:20 peterg ## Initial revision ## ############################################################### |
︙ | |||
33 34 35 36 37 38 39 | 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 | - + - + - + - + | echo '# Commands to generate subsystem representations'> $1_sub.sh echo "# File $1_sub.sh" >> $1_sub.sh echo "# Generated by MTT on `date`." >> $1_sub.sh echo >> $1_sub.sh # Get a list of all components for the _abg file |
Modified mttroot/mtt/bin/trans/abg2sympar_m2txt from [538470dfa1] to [f1c08a0b7a].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + - + | REPS='[,*]' SystemName=$2 UseLabelFile=$3 if [ -n "$UseLabelFile" ]; then ## Take input from lbl.txt strip_comments < $1_lbl.txt | tr $SEPS $REPS |\ |
︙ |
Modified mttroot/mtt/bin/trans/abg2tex from [f4bd38e131] to [cf8668b8eb].
︙ | |||
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, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 2001/07/12 04:02:53 gawthrop ## Now fixes multiports for input and output as well as state ## ## Revision 1.2 2000/11/27 17:45:00 peterg ## Removed "System" from heading ## ## Revision 1.1 2000/11/27 15:11:15 peterg ## Initial revision ## ## Revision 1.7 1997/12/06 16:20:37 peterg |
︙ | |||
129 130 131 132 133 134 135 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + | \index{\textbf{$1} -- subsystems} EOF cat $1_sub.tex >> $filename #Now do the subsystems (if at top level) if [ -z "$2" ]; then sub2subs $1 | sort -u | \ |
Modified mttroot/mtt/bin/trans/alias_txt2m from [f172c72e17] to [00b2a256d4].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 1998/07/02 19:16:03 peterg ## Prettyfied output ## ## Revision 1.1 1998/07/02 09:21:55 peterg ## Initial revision ## ############################################################### # Inform user echo Creating $1_alias.m #Create the alias file complete with headers. echo "function alias = $1_alias" > $1_alias.m echo "%% Alias file ($1_alias.m)" >> $1_alias.m echo "%% Generated by MTT at `date`" >> $1_alias.m #Write out the variables |
︙ |
Modified mttroot/mtt/bin/trans/cbg2ese_m2r from [0a2c9156c8] to [f8d94a9670].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + + | ############################################################### ## Version control history ############################################################### ## $Id$ ## ## $Log$ ## Revision 1.31 2001/07/13 04:54:04 geraint ## Branch merge: numerical-algebraic-solution back to main. ## ## Revision 1.30 2001/07/12 04:02:53 gawthrop ## Now fixes multiports for input and output as well as state ## ## Revision 1.29.2.1 2001/06/26 22:29:05 geraint ## mtt_xargs.sh eliminates Arg list too long error for large models. ## (UNIX xargs does not work if the environment is too large). ## |
︙ | |||
246 247 248 249 250 251 252 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | - + | } get_indices () { sys=$1 which=$2 |
︙ | |||
338 339 340 341 342 343 344 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - + | # Sort the struc file mv $structurefile junk sort -k 1,1 -k 2,2n junk >$structurefile # Relabel states with multiple ports relabel_multiple_definitions(){ mv $structurefile junk |
︙ |
Modified mttroot/mtt/bin/trans/cmp2cmp_m from [3837859c2d] to [da616cbb8d].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2000/12/28 12:20:04 peterg ## Initial revision ## ############################################################### # Inform user echo Revising $1_cmp.m # Copy the alias and cmp files. cat $1_alias.txt $1_cmp.m > junk #Create the cmp file complete with headers. #echo "# Component file ($1_cmp.m)" #> $1_cmp.m #echo "# Revised by MTT at `date`" #>> $1_cmp.m #Write out the variables |
︙ |
Modified mttroot/mtt/bin/trans/cmp2sub_m2sh from [db33551972] to [abbcf4831f].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (c) P.J.Gawthrop 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.8 2000/10/03 11:34:29 peterg ## Put in correct $MTT_LIB ## ## Revision 1.7 2000/01/18 14:22:58 peterg ## Now exits if file already exists ## ## Revision 1.6 1999/08/25 21:20:07 peterg ## Don't list components starting with 0 ot 1 ## ## Revision 1.5 1996/11/09 21:09:43 peterg |
︙ | |||
47 48 49 50 51 52 53 | 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 | - + - + - + - + | echo '# Commands to generate subsystem representations'> $1_sub.sh echo "# File $1_sub.sh" >> $1_sub.sh echo "# Generated by MTT on `date`." >> $1_sub.sh echo >> $1_sub.sh # Get a list of all components for the _cmp file |
Modified mttroot/mtt/bin/trans/cr_txt2r from [50e5d67b45] to [703fda25ba].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + + | # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.12 2002/04/08 17:04:21 geraint ## Removed spurious "\n" from output. ## ## Revision 1.11 2000/08/01 07:34:33 peterg ## Replaced printf by echo ## ## Revision 1.10 2000/02/25 09:10:12 peterg ## Changed -e to -f in if [ -f "$crf" ]; then ## -- cuased probs on SUN ## |
︙ | |||
89 90 91 92 93 94 95 | 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 | - + - + - + | echo >> $crfile # Recursively create subsystem CR files -- at lower level sh $1_sub.sh 'cr_txt2r ' ' _lower' # Include subsystem CR files sh $1_sub.sh 'echo ' "_cr.r" |\ |
︙ |
Modified mttroot/mtt/bin/trans/cse2scse_r from [f23aba8df6] to [31a5612a2e].
︙ | |||
18 19 20 21 22 23 24 | 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 | - + - + - + | system_scse=$1_scse.r # Parameters n=`echo $2 | sed 's/,/ /g' |wc -w` ## Number of parameters ## Parameter information for reduce. parameters=`echo $2 | sed 's/,/ /g' |\ |
︙ | |||
229 230 231 232 233 234 235 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | - + | ## Now reorganise the states mv -f $system_scse mtt_junk ##echo "Nx = $Nx" |
︙ |
Modified mttroot/mtt/bin/trans/dae2cse_r from [95da3f9a38] to [e055f9ba28].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop 1991, 1992, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.19 2001/10/26 01:01:49 geraint ## fixcc when rdae_is_dae (-cr). ## ## Revision 1.18 2001/10/05 23:37:32 geraint ## Fixed assignment statement in ae.r when RHS=0. ## ## Revision 1.17 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.16 2001/07/13 04:54:04 geraint |
︙ | |||
448 449 450 451 452 453 454 | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - + - + | touch $1_cseo.r2 cat $1_cse.r1 $1_cse.r2 > $1_cse.r cat $1_csex.r1 $1_csex.r2 > $1_csex.r cat $1_cseo.r1 $1_cseo.r2 > $1_cseo.r if [ "$solve" = "1" ]; then echo "Setting MTTNyz=0 in $1_def.r and updating other $1_def files" |
Modified mttroot/mtt/bin/trans/dat22dat from [ba08d67a1d] to [cbdbd4dbd6].
︙ | |||
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 1999 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.10 2000/10/17 12:24:02 peterg ## Three argument generic version ## ## Revision 1.9 2000/09/27 16:12:50 peterg ## Use expr to evaluate arithmetic - compatible with sh (as opposed to ## bash) ## ## Revision 1.8 2000/09/21 10:07:06 peterg ## Now correctely writes out the state into _odes.dat rep. ## |
︙ | |||
55 56 57 58 59 60 61 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | *) First=1; Last=`expr $Ny + 1` ;; esac echo Creating $1_$2$3.dat |
Modified mttroot/mtt/bin/trans/dat22sg.sh from [e519db8890] to [2702996b8e].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | { echo '' echo '</sgw:Worksheet>' } write_column_headings () { |
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + | EOF } file=${sys}_odes.sg NX=`mtt_getsize ${sys} x` NY=`mtt_getsize ${sys} y` |
︙ |
Modified mttroot/mtt/bin/trans/dat2gdat from [6a887e71c9] to [11ab5c7503].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 2002/04/16 11:36:03 gawthrop ## These were flagged with M on cvs update ## ## Revision 1.1 2000/12/28 12:26:15 peterg ## Put under RCS ## ## Revision 1.8 1998/09/29 20:01:27 peterg ## 4th argument for nyquist style files - ie differnt x for each y ## ## Revision 1.7 1997/12/04 22:10:32 peterg |
︙ | |||
54 55 56 57 58 59 60 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | # ie stack two columns vertically separated by blank lines #Get the desired data index which=`name2index $1 "$3"` echo $1 $3 $which if [ -z "$DifferentX" ]; then |
︙ | |||
94 95 96 97 98 99 100 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | if (col<=cols) { printf("\n") } } }' which="$which" <$1_$2.dat > $1_$2.gdat else |
︙ |
Modified mttroot/mtt/bin/trans/dat2siag from [4a36fa9cce] to [ce0ee2cbb1].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop, 1998. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2001/04/16 22:22:06 geraint ## *** empty log message *** ## ## Revision 1.1 1999/03/29 03:35:13 peterg ## Initial revision ## ############################################################### # This is the main transformation using awk |
︙ |
Modified mttroot/mtt/bin/trans/def2write_r from [6639ce8c03] to [7ef04b9230].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.9 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.8 2001/07/13 04:54:04 geraint ## Branch merge: numerical-algebraic-solution back to main. ## ## Revision 1.7.2.1 2001/05/04 04:07:24 geraint ## Numerical solution of algebraic equations. ## sys_ae.cc written for unsolved inputs. ## Solution of equations using hybrd from MINPACK (as used by Octave fsolve). |
︙ | |||
66 67 68 69 70 71 72 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + | # Find system constants Nx=`mtt_getsize $sys x` # States Nxx=`mtt_getsize $sys xx` # States x States Nu=`mtt_getsize $sys u` # Inputs Ny=`mtt_getsize $sys y` # Outputs Nyz=`mtt_getsize $sys yz` # Zero outputs |
︙ |
Modified mttroot/mtt/bin/trans/def_r2m from [8855e20923] to [b27ff6c61a].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (c) P.J.Gawthrop 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 1998/07/25 10:21:37 peterg ## Entirely rewritten ## ## Revision 1.1 1998/07/25 07:10:41 peterg ## Initial revision ## ############################################################### #Inform user echo Creating $1_def.m |
︙ | |||
32 33 34 35 36 37 38 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - - - - - + + + + + | % System $1, representation def, language m % File $1_def.m; % Generated by MTT on `date`; % EOF # Constants |
Modified mttroot/mtt/bin/trans/dir2paths from [98a433273b] to [45c39d446b].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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 | + + + - + - + | # Copyright (c) P.J.Gawthrop, 1998. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 1998/11/10 17:12:15 peterg ## Removed sorting ## ## Revision 1.1 1998/03/11 10:32:35 peterg ## Initial revision ## ############################################################### dotdot=$2 # Set to ../ if we are in MTT_work # Create paths for all valid examples - ie dir name is system name find $dotdot$1 -name '*_abg.fig' -print |\ |
Modified mttroot/mtt/bin/trans/dir2rep from [2f10632b5f] to [bc594f5e2a].
︙ | |||
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 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 2000/12/28 12:26:45 peterg ## *** empty log message *** ## ## Revision 1.2 1998/03/11 10:32:11 peterg ## Now uses dir2paths transformation ## ## Revision 1.1 1998/02/05 13:31:25 peterg ## Initial revision ## ############################################################### dotdot=$2 # Set to ../ if we are in MTT_work # Inform user echo "Creating $1_rep.txt (Directory version)" # Headings echo "% Verbal description for directory $1 ($1_rep.txt)"> $1_rep.txt echo "% Generated by MTT on" `date`. >> $1_rep.txt # Create paths for all valid examples - ie dir name is system name dir2paths $1 $2 | sed 's/Introduction/AAAAA/g' | sort | sed 's/AAAAA/Introduction/g' | \ |
Modified mttroot/mtt/bin/trans/dm2ir_m2dat from [acb379d922] to [d3255be9a0].
︙ | |||
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 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 1996/08/11 19:48:29 peter ## Parameter passing added. ## ## Revision 1.2 1996/08/11 10:40:00 peter ## Now handles e and NaN numbers. ## ## Revision 1.1 1996/08/10 14:15:03 peter ## Initial revision ## ############################################################### echo Creating $1_ir.dat if [ "$2" = "" ]; then PARAMS='t=[0:0.1:10]' echo Using default parameter $PARAMS else PARAMS=$2; fi |
︙ |
Modified mttroot/mtt/bin/trans/examples_txt2tk from [db2fcef527] to [f746b105d0].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: examples_txt2tk # Creates tk/tcl file for xmtt. # Copyright (c) P.J.Gawthrop, 1998,1999 # Examples menu |
︙ |
Modified mttroot/mtt/bin/trans/icd2ICD_txt22txt.sh from [2134e4a645] to [bb77e3bfab].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + | ## Interface Control Definition for System ${sys} ## ${ICD}: Generated by MTT `date` EOF cat ${icd} |\ sed 's/[\,\;]/\ /g' |\ |
Modified mttroot/mtt/bin/trans/icd_txt2m.sh from [cb0a719b07] to [9439894fee].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + | #! /bin/sh # Inform user echo Creating $1_icd.m #Create the component ICD file complete with headers. echo "function icd = $1_icd" > $1_icd.m echo "%% Component icd file ($1_icd.m)" >> $1_icd.m echo "%% Generated by MTT at `date`" >> $1_icd.m #Write out the variables |
Modified mttroot/mtt/bin/trans/lbl2alias_txt from [19255cbb75] to [5801411229].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 1998/07/02 08:34:00 peterg ## Renamed to lbl2alias_txt2txt ## ## Revision 1.1 1998/07/02 08:14:07 peterg ## Initial revision ## ############################################################### # Inform user echo Creating $1_alias.txt #Create the alias file complete with headers. echo "# Alias file ($1_alias.txt)" > $1_alias.txt echo "# Generated by MTT at `date`" >> $1_alias.txt #Write out the variables grep '[%|#]ALIAS' $1_lbl.txt |\ |
Modified mttroot/mtt/bin/trans/lbl2alias_txt2txt from [a972903b94] to [8e2770c7f9].
︙ | |||
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 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.6 1998/07/17 19:46:56 peterg ## No change ## ## Revision 1.5 1998/07/17 16:31:37 peterg ## Ignore component aliases (with /) ## ## Revision 1.4 1998/07/03 15:21:26 peterg ## Replace sub by gsub -- need to replace ALL , ## ## Revision 1.3 1998/07/03 13:49:03 peterg |
︙ | |||
42 43 44 45 46 47 48 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + | #Create the alias file complete with headers. echo "# Alias file ($1_alias.txt)" > $1_alias.txt echo "# Generated by MTT at `date`" >> $1_alias.txt #Write out the variables grep '[%|#]ALIAS' $1_lbl.txt |\ |
︙ |
Modified mttroot/mtt/bin/trans/lbl2args_txt2out from [05b9541fdd] to [81dc428574].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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 | + + + - + | #!/bin/sh # Writes argument list to standard output ready for use in calling lbl file ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 2001/07/03 22:59:08 gawthrop ## Fixed problems with argument passing for CRs ## ## Revision 1.1 2001/06/11 15:06:58 gawthrop ## Now handles user-defined components ## ############################################################### # Copyright (C) 2001 by Peter J. Gawthrop if [ -f "$1_lbl.txt" ]; then grep '[#%]ALIAS' $1_lbl.txt |\ |
︙ |
Modified mttroot/mtt/bin/trans/lbl2component from [6d85c8fe68] to [57a01a5b67].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 1998/07/28 11:23:31 peterg ## Put / explicitly in awk. ## ## Revision 1.2 1998/07/27 08:38:11 peterg ## Just look for / in the relevant field. ## ## Revision 1.1 1998/07/17 17:04:50 peterg ## Initial revision ## ############################################################### # Regexp for an alias alias='^[#%]ALIAS' |
︙ |
Modified mttroot/mtt/bin/trans/lbl2cr_txt2r from [52afa16970] to [44253224e2].
︙ | |||
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 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 2000/12/28 12:32:06 peterg ## Put under RCS ## # Revision 1.3 1996/11/03 21:11:44 peterg # Removed END; statement # ## Revision 1.2 1996/11/02 10:20:53 peterg ## Created from lbl2sympar ## ############################################################### # Inform user echo "Creating $1_cr.r" rm -f mtt_error #Write some file headers echo "%% constitutive relationship file ($1_cr.r)" > $1_cr.r echo "%% Generated by MTT at `date`" >> $1_cr.r # This is the main transformation using awk |
Modified mttroot/mtt/bin/trans/lbl2icd_txt2txt.sh from [90cc5ce192] to [2a3b38ea21].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | #Create the ICD file complete with headers. echo "# Component ICD file ($1_icd.txt)" > ${icd} echo "# Generated by MTT at `date`" >> ${icd} #Write out the variables grep '[%|#]ICD' ${lbl} |\ |
︙ |
Modified mttroot/mtt/bin/trans/lbl2modpar_txt from [ccd703b3b8] to [7d9600f181].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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 | + + + - + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $$Id$ ## $Log$ ## Revision 1.1 2001/03/29 19:24:14 gawthrop ## Can now use c representations of crs when using -c option ## ############################################################### # Inform user echo Creating $1_modpar.txt #Create the modpar file complete with headers. echo "# Modpar file ($1_modpar.txt)" > $1_modpar.txt echo "# Generated by MTT at `date`" >> $1_modpar.txt #Write out the variables grep '[%|#]MODPAR' $1_lbl.txt |\ |
︙ |
Modified mttroot/mtt/bin/trans/lbl2sympar_txt2r from [7f7d56852b] to [d2dc2feb77].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.7 2000/12/28 12:32:06 peterg ## Put under RCS ## # Revision 1.6 1996/12/07 19:39:51 peterg # Minor debugging. # ## Revision 1.5 1996/09/12 17:18:44 peter ## Don't add an RCS header .. ## ## Revision 1.4 1996/08/30 19:01:21 peter |
︙ | |||
43 44 45 46 47 48 49 | 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + | #Write some file headers echo "%% Symbolic parameter file ($1_sympar.r)" > $1_sympar.r echo "%% Generated by MTT at `date`" >> $1_sympar.r # This is the main transformation using awk tr ';' ',' < $1_lbl.txt | \ |
Modified mttroot/mtt/bin/trans/lbl_txt2tex from [0f96c4023e] to [d60cfba198].
︙ | |||
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 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.11 2002/04/19 08:39:45 gawthrop ## Changed \# to # and \% to # to avoid warning in latest gawk version ## ## Revision 1.10 2000/12/28 12:32:06 peterg ## Put under RCS ## ## Revision 1.9 2000/11/16 13:11:06 peterg ## Included PAR and UNITS declarations ## ## Revision 1.8 1999/02/17 21:42:19 peterg |
︙ | |||
52 53 54 55 56 57 58 | 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 | - + - + - + | #Create the alias file complete with headers. echo "% Label summary file ($1_lbl.tex)" > $1_lbl.tex echo "% Generated by MTT at `date`" >> $1_lbl.tex #Write out the Description grep '[%|#]SUMMARY' $1_lbl.txt | sed 's/_/\\_/g' |\ |
︙ | |||
98 99 100 101 102 103 104 | 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 | - + - + | #Write out the VARS cat <<EOF >> $1_lbl.tex \paragraph{Variable declarations:} \begin{description} EOF grep '[%|#][V|P]AR' $1_lbl.txt | sed 's/_/\\_/g' |\ |
︙ |
Modified mttroot/mtt/bin/trans/m2dat from [943f13e957] to [f209734a96].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + + + - + | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 1996/08/14 08:36:16 peter ## Initial revision ## ############################################################### echo Creating $1.dat |
Modified mttroot/mtt/bin/trans/make_ode2odes from [ca4305faeb] to [caab05287b].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.69 2002/04/17 13:46:58 geraint ## #include <fstream> for -oct as well as -cc. ## ## Revision 1.68 2002/04/15 10:54:31 geraint ## Statically declare outputs and initialise to zero. ## This is necessary to prevent spurious values from being output when no assignments are made (i.e. when "y(i) := 0 for all u" (Reduce:see NERO)). ## ## Revision 1.67 2002/04/09 12:04:21 geraint ## Replaced ios:: with std::ios:: for g++-3.0 compatability. ## |
︙ | |||
391 392 393 394 395 396 397 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | - + | EOF } # make_m make_cc() { # get octave version |
︙ |
Modified mttroot/mtt/bin/trans/makesubs from [070575132f] to [409b406455].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 2001/05/08 15:18:10 gawthrop ## Added trig and hyperbolic functions to argument exclusion list ## ## Revision 1.1 2000/12/28 09:09:52 peterg ## Initial revision ## ## ############################################################### #Inform user |
︙ | |||
45 46 47 48 49 50 51 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + - + | ## NB the following messes up the expansion switch ???? cat >> $1_subs.r <<EOF % Ordering switch ORDER EOF # Symbolic params first |
︙ |
Modified mttroot/mtt/bin/trans/modpar_txt2r from [0459392ef4] to [46d5afca36].
︙ | |||
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 | 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 | + + + - + | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $$Id$ ## $Log$ ## Revision 1.2 2002/04/16 11:36:03 gawthrop ## These were flagged with M on cvs update ## ## Revision 1.1 2001/04/02 08:19:18 gawthrop ## Translates modulated parameters into reduce ## ############################################################### # Inform user echo Creating $1_modpar.r #Create the modpar file complete with headers. echo "% Modpar file ($1_modpar.r)" > $1_modpar.r echo "% Generated by MTT at `date`" >> $1_modpar.r parameters=`strip_comments < $1_modpar.txt | cut -f1` inputs=`strip_comments < $1_modpar.txt | cut -f2` for parameter in $parameters; do grep $1_${parameter}_ $1_struc.txt |\ |
Modified mttroot/mtt/bin/trans/mtt2reps_txt from [38143b0d0c] to [14bdc5a92e].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + | #! /bin/sh # mtt2reps_txt: Gives a tabular listing of representations and languages # P J Gawthrop July 1998, October 1998 # Copyright (c) P.J.Gawthrop, 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.12 2001/07/24 04:18:32 gawthrop ## Fixed problem with shell expanding * (used as important rep marker) ## ## Revision 1.11 2001/04/28 03:38:36 geraint ## Refined selection of matching patterns - checks for exact match. ## ## Revision 1.10 2000/09/14 07:54:13 peterg ## Removed -e option in echo ## ## Revision 1.9 2000/04/05 08:34:30 peterg |
︙ | |||
47 48 49 50 51 52 53 | 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 | - + - + - + | ## Initial revision ## ############################################################### sep='|'; # Separates the languages from the rest. ## List of all representations (deleting the *) |
︙ |
Modified mttroot/mtt/bin/trans/mtt_error from [8a6269ba81] to [36e03ad5ab].
︙ | |||
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, 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.8 2000/12/28 12:34:49 peterg ## Put under RCS ## ## Revision 1.7 1998/03/06 17:14:09 peterg ## Cospetic change to message ## ## Revision 1.6 1998/03/05 10:17:41 peterg ## Cosmetic change ## ## Revision 1.5 1998/03/05 10:14:37 peterg |
︙ | |||
37 38 39 40 41 42 43 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - + | # Initial revision # ############################################################### error_file=$1; # Test for errors and print if any |
Modified mttroot/mtt/bin/trans/mtt_get_subsystems from [f462408545] to [368cf1b1dc].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - + | echo "$1 is an invalid argument - ignoring"; exit ;; esac shift done subsystems=`sh $1_sub.sh "echo grep " " $1_abg.m" |\ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_getsize from [ca21605aad] to [59fbe2a583].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 | - + | fi ## The original version for external sizes. if [ "$2" = "xx" ]; then n=`mtt_getsize $1 x` N=`echo "$n * $n" | bc` else |
Modified mttroot/mtt/bin/trans/mtt_header from [83dcd3c682] to [6c32b8d392].
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.41 2002/04/23 17:46:05 gawthrop ## _sim.m now returns time as third argument ## ## Revision 1.40 2002/04/17 16:23:59 geraint ## Partial fix for [ 545113 ] zeros missing in c++. ## Fixes -oct by removing duplicate initialisation (-c is still outstanding). ## ## Revision 1.39 2002/04/15 10:54:31 geraint ## Statically declare outputs and initialise to zero. ## This is necessary to prevent spurious values from being output when no assignments are made (i.e. when "y(i) := 0 for all u" (Reduce:see NERO)). |
︙ | |||
179 180 181 182 183 184 185 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - - + + | if [ -z "$system" ]; then echo 'Usage: mtt_header sys rep lang [stdin]' exit fi # get octave version |
︙ | |||
441 442 443 444 445 446 447 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | - + | get_sizes() { Nx=`mtt_getsize $system x` # States Nxx=`mtt_getsize $system xx` # States x States Nu=`mtt_getsize $system u` # Inputs Ny=`mtt_getsize $system y` # Outputs Nyz=`mtt_getsize $system yz` # Zero outputs |
︙ | |||
495 496 497 498 499 500 501 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | - + | declare_dummies() { # Get the dummies dummies="mtt_tmp" rm -f mtt_dummies for dummy in $dummies; do grep "${dummy}[0-9]*[ \t\n]*=" < ${fun_name}.m |\ |
︙ | |||
521 522 523 524 525 526 527 | 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - + - + | declare_switches () { cat <<EOF $Lc Declarations of switches $Rc EOF strip_comments <${system}_switch.txt |\ |
︙ | |||
672 673 674 675 676 677 678 | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | - + - + | get_field () { # parse comma separated string s=${1:-""} # comma separated string i=${2:-0} # field number in string if [ 0 -eq ${i} ]; then # return number of fields echo ${s} |\ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_langname from [c54b9eac8f] to [080d1d07c0].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: mtt_langname # Returns the language name from System_rep.lang # P.J.Gawthrop Feb 2000 # Copyright (C) 2000 by Peter J. Gawthrop |
Modified mttroot/mtt/bin/trans/mtt_m2p from [82311a7db2] to [5aa349fe2c].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.67 2002/04/18 17:02:15 gawthrop ## foo=zeros(3,1) translated as zero_state(foo,3) ## ## Revision 1.66 2001/03/30 15:13:58 gawthrop ## Rationalised simulation modes to each return mtt_data ## ## Revision 1.65 2001/02/09 02:56:46 geraint ## Translate some binary operators ## Allows use of ! in logic.txt ## |
︙ | |||
223 224 225 226 227 228 229 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - - - + + + | ## ############################################################### # Set up variables args=`echo $1 | sed 's/_/ /' | sed 's/\./ /'` |
︙ | |||
251 252 253 254 255 256 257 | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | - + | echo Creating $Filename $MethodBlurb $StdinBlurb # Find system constants Nx=`mtt_getsize $Sys x` # States Nxx=`mtt_getsize $Sys xx` # States x States Nu=`mtt_getsize $Sys u` # Inputs Ny=`mtt_getsize $Sys y` # Inputs |
︙ | |||
377 378 379 380 381 382 383 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + | echo " AA,mtte : StateMatrix;" echo " MTTi,MTTj,it,iLast: INTEGER;" ##echo " mttSTEPFACTOR,mttWSTEPS,mttSTEPS,mttINPUT : INTEGER;" ## echo " mttMETHOD : IntegrationMethod;" echo " open_switches : StateVector;" echo " numparfile, statefile, simparfile : TEXT;" strip_comments <${Sys}_switch.txt |\ |
︙ | |||
432 433 434 435 436 437 438 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - + - + | cat $Sys_rep.m |\ grep -v 'Remove in mtt_m2p' |\ grep -v '^[ ]*function' |\ grep -v '^[ ]*endfunction' |\ grep -v 'MTT_data' |\ sed "s/^$space%/#/" | sed "s/\([;)]$space\)%/\1#/" |\ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_make_menu from [b7552da8d5] to [7786b633df].
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + | EOF for sys in $systems; do echo .sys.sys add radio -label "$sys" -command {set system "$sys"} done # Create the options menu |
︙ |
Modified mttroot/mtt/bin/trans/mtt_make_sim from [d2886556d7] to [0eacf885ca].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.7 2000/05/19 17:47:35 peterg ## Fixed bug in oct version but still needs proper check ## ## Revision 1.6 2000/05/17 17:20:49 peterg ## Fixed bugs with ny>1. Could be made faster by not generating y when ## y_sim >1 ## ## Revision 1.5 2000/05/17 16:01:42 peterg ## Fixed bug for n_y>1 ## |
︙ | |||
57 58 59 60 61 62 63 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + | odeo=odeo fi # Find system constants Nx=`mtt_getsize $Sys x` # States Nu=`mtt_getsize $Sys u` # Inputs Ny=`mtt_getsize $Sys y` # Inputs |
︙ |
Modified mttroot/mtt/bin/trans/mtt_make_sympar from [fab900c9ec] to [7c246fcfb8].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.10 2001/07/28 21:10:18 geraint ## Generate warning instead of error if reserved word used. ## ## Revision 1.9 2001/07/23 05:16:39 geraint ## Simple filter for Reduce reserved words in sympar. ## ## Revision 1.8 2001/07/04 06:00:12 gawthrop ## Fixed a funny with tr - changed SEPS and REPS - something to do with ^ ## ## Revision 1.7 2001/04/13 07:14:12 geraint |
︙ | |||
47 48 49 50 51 52 53 | 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 | - + - + - + | sys=$1 # System name filename=$1_sympar.txt # Inform user echo Creating $filename # Create list of all sympars including those that are aliased sh $1_type.sh 'echo ' ' ' ' ' |\ |
︙ | |||
99 100 101 102 103 104 105 | 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 | - + - + | } printf("\n") }' < mtt_sympar.txt >$filename reserved_words=`\ cat ${MTT_LIB}/reduce/reserved_words.txt |\ |
Modified mttroot/mtt/bin/trans/mtt_mend_lines from [b94de50d4f] to [0579d4ac5f].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | #!/bin/sh # Copyright (C) 2000 by Peter J. Gawthrop # Fixes broken lines from reduce. #sed 's/[^#]\(.*\)[^;]$/\1\\/' |
︙ |
Modified mttroot/mtt/bin/trans/mtt_multi from [c98cabcb91] to [cdd0534fee].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + | #!/bin/sh # Does mutiple commands down the hierarchy command=$1 system=$2 rep=$3 lang=$4 relative_level=$5 |
Modified mttroot/mtt/bin/trans/mtt_name2array from [6eeef7468b] to [3800132da3].
︙ | |||
13 14 15 16 17 18 19 | 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 | - + - + - + - + - + | case $2 in numpar) name=mttpar cat $1_sympar.txt>mtt_infile ;; state) name=mttx |
︙ |
Modified mttroot/mtt/bin/trans/mtt_p2C from [15da882620] to [4c8ad0a9b3].
︙ | |||
21 22 23 24 25 26 27 | 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 | - + - + - + - + - + - + - + | # Find system constants Nx=`mtt_getsize $1 x` Nxx=`mtt_getsize $1 xx` Nu=`mtt_getsize $1 u` Ny=`mtt_getsize $1 y` |
Modified mttroot/mtt/bin/trans/mtt_p2cc from [7206315b5e] to [9cd1ab95be].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | #Extract Type info echo '/* Types */' >> $sys_rep.cc grep typedef $sys_rep.C >> $sys_rep.cc #Extract the rep code converting [] to () and deleting mtt variables etc #The awk part detects the begin and end of the relevant code. echo "/* Representation $rep information */" >> $sys_rep.cc |
︙ |
Modified mttroot/mtt/bin/trans/mtt_p2m from [2ad4e8ad5c] to [a6fa5071b9].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + | #! /bin/sh ## Chages the Pascal output from gentran to octave form # Copyright (C) 2000 by Peter J. Gawthrop sed 's/begin$//' |\ sed 's/end$//' |\ sed 's/end;$/;/' |\ sed 's/\[\([0-9,]*\)\]/(\1)/g' |\ sed 's/:=/ = /' |\ sed 's/\*\*/\^/g' |\ sed 's/mtt\([a-z]\)\([a-z]*\)\([0-9]\)\([0-9]*\)/mtt\1\2(\3\4)/g' |\ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_pinclude from [dd55a77a76] to [2dabecc7a7].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + + + - + | #!/bin/sh # pinclude - explicitly includes Pascal files - p2c has probs. doing this ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2000/12/28 11:56:46 peterg ## Put under RCS ## ############################################################### |
︙ |
Modified mttroot/mtt/bin/trans/mtt_repname from [35f149671a] to [bde7d0e306].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: mtt_repname # Returns the representation name from System_rep.lang # P.J.Gawthrop Feb 2000 # Copyright (C) 2000 by Peter J. Gawthrop |
Modified mttroot/mtt/bin/trans/mtt_strip_args from [9071d8da44] to [bcb8540542].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + + + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: strip args # Strips unwanted bits from a list of arguments # Label file to symbolic parameters conversion # Copyright (C) 2000 by Peter J. Gawthrop ## $Id$ ## ## $Log$ ## Revision 1.6 2001/07/04 06:00:12 gawthrop ## Fixed a funny with tr - changed SEPS and REPS - something to do with ^ ## ## Revision 1.5 2001/06/13 14:50:13 gawthrop ## Operator ^ now ok in args in abg and/or lbl ## ## Revision 1.4 2001/05/08 15:18:10 gawthrop ## Added trig and hyperbolic functions to argument exclusion list ## ## Revision 1.3 2000/10/17 12:33:13 peterg |
︙ | |||
33 34 35 36 37 38 39 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | SEPS='^=*;+/()-' # Replace by , REPS='[,*]' # This is the main transformation using gawk tr $SEPS $REPS | \ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_sysname from [61d88d20d5] to [4a73c625bc].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: mtt_sysname # Returns the system name from System_rep.lang # P.J.Gawthrop Feb 2000 # Copyright (C) 2000 by Peter J. Gawthrop |
Modified mttroot/mtt/bin/trans/mtt_txt2declare from [f28a37be46] to [63bdb9c744].
︙ | |||
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) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 2000/10/14 09:32:50 peterg ## struc version only does state and input ## ## Revision 1.1 2000/10/14 09:26:48 peterg ## Initial revision ## ## Revision 1.1 2000/10/11 09:08:20 peterg ## Initial revision ## |
︙ | |||
35 36 37 38 39 40 41 | 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 | - + - + - + | ;; *) echo Language $language not supported - sorry; exit 1 esac case $what in struc) |
︙ |
Modified mttroot/mtt/bin/trans/mtt_txt2m from [4f5082efa1] to [cf306685c7].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% Version control history # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% $Id$ # %% $Log$ # %% Revision 1.16 2002/04/18 17:51:11 gawthrop # %% Put default values in _simpar.m in case of missing values in txt file # %% # %% Revision 1.15 2002/03/26 12:00:37 geraint # %% Escaped characters to eliminate awk warnings. # %% # %% Revision 1.14 2001/07/13 04:54:04 geraint # %% Branch merge: numerical-algebraic-solution back to main. # %% # %% Revision 1.13.4.2 2001/07/09 00:24:58 geraint |
︙ | |||
210 211 212 213 214 215 216 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + | EOF fi # Write out the code from the txt file echo >> $outfile echo "## User defined code from $1_$2.txt" >> $outfile cat $1_$2.txt | strip_comments | grep -v METHOD |\ |
︙ |
Modified mttroot/mtt/bin/trans/mtt_update from [da39fd9946] to [9bbb28550a].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + + | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.16 2000/10/17 13:45:18 peterg ## split up state and input - different defaults ## ## Revision 1.15 2000/10/17 09:53:05 peterg ## More on logic rep ## ## Revision 1.14 2000/10/17 08:36:56 peterg ## Included logic rep. ## ## Revision 1.13 2000/10/15 09:27:13 peterg |
︙ | |||
85 86 87 88 89 90 91 | 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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + - + - + - + - + | default='1.0' ;; input) lang=txt textfile=$1_$2.$lang infofile=mtt_list.$lang moreinfofile=mtt_list_numpar.$lang |
︙ | |||
166 167 168 169 170 171 172 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + - + - + | } }' default=$default mtt_text mtt_info mtt_moreinfo if [ -z "$update" ]; then if [ -f "mtt_in_text" ]; then echo "The following variables are defined in $textfile, but do not exist:" |
︙ | |||
208 209 210 211 212 213 214 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | - + - + | esac done fi answered='' if [ -f "mtt_in_info" ]; then echo "The following variables exist, but are not defined in $textfile:" |
Modified mttroot/mtt/bin/trans/name2index from [23ba065049] to [f7933c91d6].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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 | + + + - + | # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.5 2000/11/27 18:06:33 peterg ## *** empty log message *** ## ## Revision 1.4 1997/12/04 22:10:18 peterg ## Handles argument list - variable names. ## ## Revision 1.3 1997/05/22 09:42:48 peterg ## Returns 0 if no names. ## ## Revision 1.2 1997/05/22 09:28:22 peterg ## Removed trailing , in output. ## ## Revision 1.1 1997/05/22 08:48:21 peterg ## Initial revision ## ############################################################### |
︙ |
Modified mttroot/mtt/bin/trans/numpar_txt2c from [a692cf3be8] to [c7bf2ec183].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.6 2000/12/28 12:52:13 peterg ## *** empty log message *** ## ## Revision 1.5 1997/06/13 09:42:25 peterg ## Auto change of () to [] ## # Revision 1.4 1997/05/15 08:33:07 peterg # Declare state array (x). # # Revision 1.3 1997/05/03 15:01:42 peterg |
︙ | |||
51 52 53 54 55 56 57 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + | echo "extern double x[MTTNX1];" >> $1_numpar.c echo "#include \"$1_sympar.c\"" >> $1_numpar.c echo "$1_numpar()" >> $1_numpar.c echo '{' >> $1_numpar.c #Write out the variables in c format. sed 's/#C-CODE //'< $1_numpar.txt |\ |
Modified mttroot/mtt/bin/trans/numpar_txt2m from [55a143892d] to [73ccf44327].
︙ | |||
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 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 2000/12/28 12:52:22 peterg ## *** empty log message *** ## ## Revision 1.3 1998/07/25 18:26:33 peterg ## *** empty log message *** ## # Revision 1.2 1997/05/01 08:24:38 peterg # Now uses # as the comment symbol in the .txt file # # Revision 1.1 1997/05/01 07:45:17 peterg |
︙ | |||
33 34 35 36 37 38 39 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | # Global variable list #echo >> $1_numpar.m #echo "# Global variable list" >> $1_numpar.m #sympar2global_txt2m $1 >> $1_numpar.m #Write out the variables in m format. |
Modified mttroot/mtt/bin/trans/obs_r2m from [425f980273] to [1411db277c].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | # Remove the old log file rm -f obs_r2m.log rm -f $1_obs.m? rm -f $1_obsa.m # Is the system affine (look in the _obs.r file |
︙ |