ADDED mttroot/mtt/bin/trans/m/cause2name.m Index: mttroot/mtt/bin/trans/m/cause2name.m ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/m/cause2name.m @@ -0,0 +1,27 @@ +function name = cause2name(causality) +% cause2name - converts causality to a string +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%% Model Transformation Tools %%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Matlab function cause2name +% name = cause2name(causality) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +% Copyright (c) P.J. Gawthrop, 1996. + +if causality==1 + name = 'effort'; +elseif causality ==-1 + name = 'flow'; +else + name = 'state'; +end; ADDED mttroot/mtt/bin/trans/m/cause2num.m Index: mttroot/mtt/bin/trans/m/cause2num.m ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/m/cause2num.m @@ -0,0 +1,27 @@ +function num = cause2num(causality) +% cause2num - converts causality to a string +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%% Model Transformation Tools %%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Matlab function cause2num +% num = cause2num(causality) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +% Copyright (c) P.J. Gawthrop, 1996. + +if causality==1 + num = 1; +elseif causality ==-1 + num = 2; +else + num = 3; +end; ADDED mttroot/mtt/bin/trans/m/sign2name.m Index: mttroot/mtt/bin/trans/m/sign2name.m ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/m/sign2name.m @@ -0,0 +1,26 @@ +function name = sign2name(sign); +% sign2name - converts sign to a string +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%% Model Transformation Tools %%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Matlab function sign2name + + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + +if sign==1 + name = '+'; +elseif sign ==-1 + name = '-'; +else + name = '??'; +end;