Index: mttroot/mtt/bin/trans/switch_txt2m ================================================================== --- mttroot/mtt/bin/trans/switch_txt2m +++ mttroot/mtt/bin/trans/switch_txt2m @@ -8,10 +8,18 @@ # Convert switch file from txt to m # P.J.Gawthrop May 1997 # Copyright (c) P.J.Gawthrop, 1997. + +############################################################### +## Version control history +############################################################### +## $Id$ +## $Log$ +############################################################### + echo Creating $1_switch.m echo Creating $1_switcha.m # Find system constants @@ -28,11 +36,12 @@ # printf("end;\n\n") printf("#== Switches set element of state vector to zero ==#\n") } else{ printf("\n#== Switch: %s ==#\n",$1) - printf("if ((%s==0.0)||((%s<0.0)&&mttx(%s)<=0.0)) \n", $1,$1,$2); + printf("if (%s==0.0) \n", $1); +# printf("if ((%s==0.0)||((%s<0.0)&&mttx(%s)<=0.0)) \n", $1,$1,$2); printf(" mttx(%s)=0.0;\n", $2); printf("end;\n"); } }' Nx=$Nx < $1_switch.txt >> $1_switch.m