Index: mttroot/mtt/bin/trans/switch_txt2m ================================================================== --- mttroot/mtt/bin/trans/switch_txt2m +++ mttroot/mtt/bin/trans/switch_txt2m @@ -14,10 +14,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.13 2000/11/09 10:19:12 peterg +## Explicitly write out the open switches .... +## ## Revision 1.12 2000/11/09 09:52:07 peterg ## Removed [] from zero_state output ## ## Revision 1.11 2000/10/17 09:55:55 peterg ## Now writes to standard output @@ -89,22 +92,22 @@ #cat $1_logic.txt >> $1_switchopen.m # Set states to zero awk '{ if ($1=="#"){ - printf("#== open - boolean vector of open switches ==#\n") + printf("#== mttopen - boolean vector of open switches ==#\n") for (i=1;i<=Nx;i++) - printf("open(%i) = 0; # Default to not open\n", i); + printf("mttopen(%i) = 0; # Default to not open\n", i); } else{ printf("\n#== Switch: %s ==#\n",$1) printf("if (%s_logic==0.0) \n", $1); - printf(" open(%s) = 1;\n", $2); + printf(" mttopen(%s) = 1;\n", $2); printf("end;\n"); printf("if (%s_logic<0.0)\n",$1); printf(" if (%s<0.0)\n",$1); - printf(" open(%s) = 1;\n", $2); + printf(" mttopen(%s) = 1;\n", $2); printf(" end;\n"); printf("end;\n"); } }' Nx=$Nx < $1_switch.txt #>> $1_switchopen.m