Index: mttroot/mtt/bin/trans/ode_r2m ================================================================== --- mttroot/mtt/bin/trans/ode_r2m +++ mttroot/mtt/bin/trans/ode_r2m @@ -3,19 +3,22 @@ ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: ode_r2m -# Reduce ODE to simulab ODE +# Reduce ODE to matlab ODE # P.J.Gawthrop 14 June 1991, 12 Jan 1994, April 1994, Jan 95. # Copyright (c) P.J.Gawthrop 1991, 1994, 1995, 1996 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +# Revision 1.6 1997/01/05 19:34:35 peterg +# Don't write globals which are already assigned to a number. +# ## Revision 1.5 1996/09/13 19:41:39 peter ## *** empty log message *** ## ## Revision 1.4 1996/09/12 18:33:32 peter ## Put back under rcs @@ -87,26 +90,26 @@ write "$1_args"; write "% Set up the State variables"; FOR i := 1:MTTNx DO BEGIN - write "MTTx", i, " = x(", i, ");"; + write "mttx", i, " = x(", i, ");"; END; write "% Set up the Input variables"; IF MTTNu>0 THEN FOR i := 1:MTTNu DO BEGIN - write "MTTu", i, " = u(", i, ");"; + write "mttu", i, " = u(", i, ");"; END; END; % Firstly do the dx = f(x,t) function. OUT "$1_ode.m"; -write "function MTTdX = $1_ode(x,t);"; -write "% dX = $1_ode(x,t);"; +write "function mttdx = $1_ode(x,t);"; +write "% mttdx = $1_ode(x,t);"; write "%ODE in Simulab form for system $1;;"; write "%File $1_ode.m;;"; write "%Generated by MTT;;"; common(); @@ -123,12 +126,12 @@ SHUT "$1_ode.m"; OFF fort; % Now do the y = g(x,t) function. OUT "$1_odeo.m"; -write "function MTTy = $1_odeo(x,t);"; -write "% dX = $1_odeo(x,t);"; +write "function mtty = $1_odeo(x,t);"; +write "% mtty = $1_odeo(x,t);"; write "%ODE in Simulab form for system $1;;"; write "%File $1_odeo.m;;"; write "%Generated by MTT;;"; common();