Index: mttroot/mtt/bin/trans/makecr ================================================================== --- mttroot/mtt/bin/trans/makecr +++ mttroot/mtt/bin/trans/makecr @@ -2,62 +2,35 @@ ###################################### ##### Model Transformation Tools ##### ###################################### -# Bourne shell script: mtt - -# Usage: mtt system_name representation_name -# E.g.: -# mtt dc mtf -# converts dc to matlab transfer function form. -# -# P.J.Gawthrop Oct 1989, Dec 1989, 1990, 1991, Oct 1993, Dec 1993, Jan 1994. -# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994. +# Bourne shell script: makecr + +# Copyright (c) P.J.Gawthrop 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.1 1996/08/24 14:53:06 peter +## Initial revision +## ############################################################### #Inform user echo Creating $1_cr.r -cat - > $1_cr.r << EOF -%Default CR file -%File $1_cr.r -%Generated by MTT - -%Unity CR -OPERATOR Unity; -FOR ALL Causality,Input -LET Unity(Causality,Input) = Input; - -%Linear CR: e = Gain*f (if DefaultCausality = flow) -% f = Gain*e (if DefaultCausality = effort) -OPERATOR Lin; -FOR ALL DefaultCausality, Gain, Causality, Input -SUCH THAT Causality = DefaultCausality -LET Lin(DefaultCausality, Gain, Causality, Input) = Gain*Input; - -%Linear CR: e = (1/Gain)*f (if DefaultCausality = flow) -% f = (1/Gain)*e (if DefaultCausality = effort) -FOR ALL DefaultCausality, Gain, Causality, Input -SUCH THAT Causality NEQ DefaultCausality -LET Lin(DefaultCausality, Gain, Causality, Input) = (1/Gain)*Input; - -%Default CR -% -- Unity CR -OPERATOR Default; -FOR ALL Causality,Input -LET Default(Causality,Input) = Unity(Causality,Input); - -END; - -EOF +echo % Default CR file > $1_cr.r +echo % File $1_cr.r >> $1_cr.r +echo % Generated by MTT on `date`. >> $1_cr.r +echo >> $1_cr.r +echo %This is the linear CR. >> $1_cr.r +cat $MTTPATH/cr/r/lin.r >> $1_cr.r + +