Index: mttroot/mtt/bin/trans/def2write_r ================================================================== --- mttroot/mtt/bin/trans/def2write_r +++ mttroot/mtt/bin/trans/def2write_r @@ -11,10 +11,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.15 2002/08/29 15:45:20 geraint +## Tests for existence of matrix before entering shell loop. +## Tests for existence of expression before attempting to write or optimise. +## ## Revision 1.14 2002/08/09 14:34:45 geraint ## Fix to prevent numbers being formed with a decimal point in the exponent, Reduce cannot handle these. ## ## Revision 1.13 2002/07/10 17:43:05 geraint ## Added feature [ 562453 ] Optimisation of algebraic equations. @@ -229,11 +233,11 @@ echo 'load gentran$' fi >> $1_$2_write.r for matrix in $matrices; do matrix_exists=`grep -i MTT${matrix} ${sys}_dae.r | wc -l | gawk '{print $1}'` - if [ $matrix_exists -gt 0 ]; then + if [ "$matrix" = "EdX" -o $matrix_exists -gt 0 ]; then n=`first "$ns"`; ns=`rest "$ns"` m=`first "$ms"`; ms=`rest "$ms"` is=`n2m 1 $n`; js=`n2m 1 $m`; if [ $n -ge 1 ]; then