Index: mttroot/mtt/lib/comp/simple/AE_eqn.m ================================================================== --- mttroot/mtt/lib/comp/simple/AE_eqn.m +++ mttroot/mtt/lib/comp/simple/AE_eqn.m @@ -5,10 +5,14 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.3 1996/08/30 19:03:10 peter +% %% Added argument check. +% %% Added extra name argument. +% %% % %% Revision 1.2 1996/08/30 13:23:11 peter % %% Added bond number check % %% % %% Revision 1.1 1996/08/22 13:12:34 peter % %% Initial revision @@ -34,22 +38,31 @@ % Flow on port 1 is always zero fprintf(eqnfile, '%s := 0;\n', ... varname(name,bond_number(1), -1)); -LHS_cause = 1; -RHS_cause = 1; +outcause = 1; +incause = 1; if e_2 == -1 % Unicausal: e_2 := e_1 - LHS_number = bond_number(2); - RHS_number = bond_number(1); + outbond = bond_number(2); + inbond = bond_number(1); + outport = 2; + inport = 1; else % Bicausal: e_1 := e_2 - LHS_number = bond_number(1); - RHS_number = bond_number(2); + outbond = bond_number(1); + inbond = bond_number(2); + outport = 1; + inport = 2; end -oneeqn(name,LHS_number,LHS_cause,RHS_number,RHS_cause,cr,args,eqnfile); + +eqn = equation(name,cr,args,outbond,outcause,outport, ... + inbond,incause,inport); +fprintf(eqnfile, '%s',eqn); - + + +