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: |
7f06c77943479df149e8bc24ea816536 |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-10 09:07:32 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-10
| ||
10:25:23 | put = at the beginnig of SEPS list - at the end causes an error ??? check-in: 630ffc5d2b user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:07:32 | Initial revision check-in: 7f06c77943 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
07:49:34 | Initial revision check-in: 5f8f31a739 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/def2write_r version [6f4ac0a51f].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | #!/bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: def2write.r # Generates r code to write matrices # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### sys=$1 # System name rep=$2 # System representation # Inform User echo Creating $1_$2_write.r # 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 Npar=`wc -l $sys\_sympar.txt | awk '{print $1}'` # Set up representation-specific stuff case $rep in ode) matrices='dX Y Yz' ns="$Nx $Ny $Nyz" ms="1 1 1" ;; *) echo def2write_r: representation $rep not recognised exit esac # Write out the code echo 'off echo$ load scope$' >$1_$2_write.r echo 'optimize' >>$1_$2_write.r for matrix in $matrices; do n=`first "$ns"`; ns=`rest "$ns"` m=`first "$ms"`; ms=`rest "$ms"` is=`n2m 1 $n`; js=`n2m 1 $m`; for i in $is; do for j in $js; do name=`echo MTT$matrix'('$i','$j')'` echo ' '$name ':=:' $name',' >>$1_$2_write.r done done done echo 'INAME mtt_tmp$' >>$1_$2_write.r echo 'END$' >>$1_$2_write.r |