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: |
99e267ac746fc75a6c8695e2b1544a7b |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-10 21:02:27 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-10
| ||
21:03:20 | *** empty log message *** check-in: 470e3ae16f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
21:02:27 | Initial revision check-in: 99e267ac74 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
21:02:17 | Added cse reps check-in: f987c1a49f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/mtt_header version [6857243a08].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | #!/bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: mtt_header # Headings for functions # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### # Arguments system=$1 rep=$2 language=$3 args=$4 output=$5 extras=$6 # Find system constants 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 Npar=`wc -l $system\_sympar.txt | awk '{print $1}'` # Representation-specific stuff case $rep in cse) states=yes; inputs=yes; ;; cseo) states=yes; inputs=yes; ;; ode) states=yes; inputs=yes; ;; odeo) states=yes; inputs=yes; ;; sm) states=no; inputs=no; ;; *) esac # Lanuage specific stuff case $language in m) modeline='% -*-octave-*- Put Emacs into octave-mode%'; ext='m'; Lc='##'; Rc=''; Lb='('; Rb=')'; function="function" declaration="[$output] = $1_$rep($args);" ;; *) echo Language $language not supported - sorry; exit 1 esac # Header information cat<<EOF $modeline $function $declaration $Lc $declaration $Lc System $system, representation $rep, language $language; $Rc $Lc File $1_$rep.$ext; $Rc $Lc Generated by MTT on `date`; $Rc EOF # Parameters cat <<EOF $Lc Parameters EOF sympar2par_txt2m $1 # States if [ "$states" = "yes" ]; then cat <<EOF $Lc States EOF N=`n2m 1 $Nx` for i in $N; do echo ' mttx'$i' = mttx('$i');' done fi # Inputs if [ "$inputs" = "yes" ]; then cat <<EOF $Lc Inputs EOF N=`n2m 1 $Nu` for i in $N; do echo ' mttu'$i' = mttu('$i');' done fi |