Question: Error, invalid loop statement termination

Please help me for removing an error in my code.

Thank you

durb.mw
 

"   restart:     NL:=960:    LL:=4:      BB:=0.6 :  T:=16:    MM:=NL*(LL+1):          for  NC  from 0 by 1 to MM-1  do       S:=BB+(2*Pi*NC/T)*I;          powerFactor := 0.05 * (sqrt(2.0) - 1.202081528);     powerTerm := sqrt(S)*sqrt(49*S^(2)+280*S+800)/sqrt(S+4);       preFactor := 1/((exp(sqrt(2.0)*powerTerm/10.0)-1.0)*S);       XS(NC+1):= preFactor * ((-exp(-powerFactor*powerTerm) + exp(powerFactor*powerTerm)) * exp(sqrt(2.0)*powerTerm/20.0));    end  do;    for  timeCounter from 0 by 1 to  NL-1  do     totalTerm:=0;     for KK from 0 to NL-1 do        for L from 0 to LL do           Term1:=Re(XS(KK+L*NL+1))+I*(Im(XS(KK+L*NL+1)));           Term2:=exp((timeCounter*KK*2*Pi/NL)*I);           totalTerm:=totalTerm+Term1*Term2;        end do     end do     XT(timeCounter+1):=((2.0/T)*exp(BB*timeCounter*T/NL)*(-0.5*Re(XS(1))+Re(totalTerm)));     TT(timeCounter+1):=(timeCounter*T)/NL;         end do    "

Error, invalid loop statement termination

"   restart:    NL:=960:  LL:=4:  BB:=0.6 :  T:=16:    MM:=NL*(LL+1):       for NC  from 0 by 1 to MM-1  do     S:=BB+(2*Pi*NC/T)*I;    powerFactor := 0.05 * (sqrt(2.0) - 1.202081528);   powerTerm := sqrt(S)*sqrt(49*S^2+280*S+800)/sqrt(S+4);    preFactor := 1/((exp(sqrt(2.0)*powerTerm/10.0)-1.0)*S);     XS(NC+1):= preFactor * ((-exp(-powerFactor*powerTerm) + exp(powerFactor*powerTerm)) * exp(sqrt(2.0)*powerTerm/20.0));    end  do;    for timeCounter from 0 by 1 to NL-1  do  totalTerm:=0;     for KK from 0 to NL-1 do        for L from 0 to LL do  Term1:=Re(XS(KK+L*NL+1))+I*(Im(XS(KK+L*NL+1)));  Term2:=exp((timeCounter*KK*2*Pi/NL)*I);  totalTerm:=totalTerm+Term1*Term2;        end do     end do   XT(timeCounter+1):=((2.0/T)*exp(BB*timeCounter*T/NL)*(-0.5*Re(XS(1))+Re(totalTerm)));   TT(timeCounter+1):=(timeCounter*T)/NL;      end do    "

 

``

``


 

Download durb.mw

 

Please Wait...