Index: mttroot/mtt/bin/trans/sympar2numpar_r2m ================================================================== --- mttroot/mtt/bin/trans/sympar2numpar_r2m +++ mttroot/mtt/bin/trans/sympar2numpar_r2m @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.9 1996/09/12 19:26:05 peter +## Input _params file. +## ## Revision 1.8 1996/08/30 19:37:43 peter ## Moved headers in shell script. ## ## Revision 1.7 1996/08/24 14:11:56 peter ## Global parameter passing. @@ -60,23 +63,35 @@ IF MTTNvar>0 THEN BEGIN write "global ...;;"; FOR i := 1:MTTNvar DO - BEGIN - IF i0 THEN BEGIN FOR i := 1:MTTNvar DO - BEGIN - write MTTVar(i,1), " = 1; % Default value"; - END; + IF numberp(MTTVar(i,1)) + THEN + BEGIN + write "% Variable ", i, " has already been set to ", MTTVar(i,1); + END + ELSE + BEGIN + write MTTVar(i,1), " = 1; % Default value"; + END; END; if MTTNVar=0 THEN write "foo=0"; @@ -85,11 +100,11 @@ EOF matlab_tidy $1_numpar1.m #Create the numpar file complete with headers. -echo "%% Symbolic parameter file ($1_numpar.m)" > $1_numpar.m +echo "%% Numerical parameter file ($1_numpar.m)" > $1_numpar.m echo "%% Generated by MTT at `date`" >> $1_numpar.m cat $MTTPATH/trans/m/rcs_header.txt >> $1_numpar.m cat $1_numpar1.m >> $1_numpar.m echo '%% Input the user-defined parameters' >> $1_numpar.m