ADDED mttroot/mtt/bin/trans/numpar2subs_txt2r Index: mttroot/mtt/bin/trans/numpar2subs_txt2r ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/numpar2subs_txt2r @@ -0,0 +1,52 @@ +#! /bin/sh + + ###################################### + ##### Model Transformation Tools ##### + ###################################### + +## Makes algebraic substitution file from numpar file. +## Omitting all parameter in 2nd argument + + ############################################################### + ## Version control history + ############################################################### + ## $Id$ + ## $Log$ + ############################################################### + +# Copyright (C) 2002 by Peter J. Gawthrop + +sys=$1 +pars=$2 + +outfile=${sys}_subs.r +infile=${sys}_numpar.txt + +echo Creating ${outfile} from ${infile} +cat< ${outfile}_1 +%% File ${outfile} generated on `date` from ${infile} +%% All parameters replaced by numbers except for: +%% ${pars} + +EOF + +sed 's/#/%/g' < Compensator_numpar.txt | sed 's/=/:=/' >> ${outfile}_1 + +cat >> ${outfile}_1 < ${outfile} + +rm ${outfile}_1 +