Index: mttroot/mtt/bin/trans/dat2gdat ================================================================== --- mttroot/mtt/bin/trans/dat2gdat +++ mttroot/mtt/bin/trans/dat2gdat @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.1 2000/12/28 12:26:15 peterg +## Put under RCS +## ## Revision 1.8 1998/09/29 20:01:27 peterg ## 4th argument for nyquist style files - ie differnt x for each y ## ## Revision 1.7 1997/12/04 22:10:32 peterg ## Handles argument list - variable names. @@ -50,10 +53,11 @@ # Convert multi-columns into gnuplot format - # ie stack two columns vertically separated by blank lines #Get the desired data index which=`name2index $1 "$3"` +echo $1 $3 $which if [ -z "$DifferentX" ]; then awk ' BEGIN{ row=0; col=0; Index: mttroot/mtt/bin/trans/modpar_txt2r ================================================================== --- mttroot/mtt/bin/trans/modpar_txt2r +++ mttroot/mtt/bin/trans/modpar_txt2r @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $$Id$ ## $Log$ +## Revision 1.1 2001/04/02 08:19:18 gawthrop +## Translates modulated parameters into reduce +## ############################################################### # Inform user echo Creating $1_modpar.r @@ -26,8 +29,16 @@ parameters=`strip_comments < $1_modpar.txt | cut -f1` inputs=`strip_comments < $1_modpar.txt | cut -f2` for parameter in $parameters; do - grep $parameter $1_struc.txt | grep input |\ - awk '{printf("%s := mttu(%i,1);\n", parameter, $2)}' parameter=$parameter >> $1_modpar.r + grep $1_${parameter}_ $1_struc.txt |\ + awk 'BEGIN{ + name["input"] = "u"; + name["output"] = "y"; + name["state"] = "x"; + name["nonstate"] = "z"; + } + { + printf("%s := mtt%s(%i,1);\n", parameter, name[$1], $2) + }' parameter=$parameter >> $1_modpar.r done