Index: mttroot/mtt/bin/trans/switch_txt2m ================================================================== --- mttroot/mtt/bin/trans/switch_txt2m +++ mttroot/mtt/bin/trans/switch_txt2m @@ -20,12 +20,12 @@ lang_header $1 switch m mttx '[mttxs]' > $1_switch.m # This is the main transformation using gawk awk '{ if ($1=="#"){ - printf("for i=1:%s\n", Nx) - printf(" mttxs(i) = mttx(i);\n") + printf("for MTTi=1:%s\n", Nx) + printf(" mttxs(MTTi) = mttx(MTTi);\n") printf("end;\n\n") } else{ printf("if (%s==0.0)\n mttxs(%s)=0.0;\nend;\n\n", $1,$2) printf("if (%s<0.0)\n if (mttx(%s)<0.0)\n mttxs(%s)=0.0;\n end;\nend;\n", $1,$2,$2)