Index: mttroot/mtt/bin/trans/make_ode2odes ================================================================== --- mttroot/mtt/bin/trans/make_ode2odes +++ mttroot/mtt/bin/trans/make_ode2odes @@ -7,10 +7,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.17 1999/03/15 01:09:15 peterg +## Fixed bugs when Nx=0 (no state) +## ## Revision 1.16 1999/03/06 02:28:38 peterg ## Rearranged evaluation to: state - input - output - write ## ## Revision 1.15 1999/03/06 02:19:43 peterg ## Changed args to _input @@ -105,11 +108,11 @@ MTTddt = mttdt/mttstepfactor; # The small sample interval endif; for MTTit = 1:MTTilast #Integration loop -MTTit + if $Nx>0 # Don't if no states if mttmethod==1 # Euler for MTTjt = 1:mttstepfactor [MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative [MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update @@ -127,11 +130,10 @@ endif; else MTTt = MTTt + mttdt; endif; # $Nx>0 -MTTit [MTTy] = $1_odeo(MTTx,MTTu,MTTt); # Output [MTTu] = $1_input(MTTt,MTTx,MTTy); # Input mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # Write it out endfor; # Integration loop