Index: mttroot/mtt/bin/trans/m/abg2cbg.m ================================================================== --- mttroot/mtt/bin/trans/m/abg2cbg.m +++ mttroot/mtt/bin/trans/m/abg2cbg.m @@ -15,10 +15,15 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.25 1998/06/25 18:53:30 peterg +% %% Actually, the previous comment was optimistic. +% %% The port causalities on a compound are now forced to be the same as +% %% that specified by a a _cuase.m file (if it exists) +% %% % %% Revision 1.24 1998/06/25 17:45:03 peterg % %% No change -- but checked that explicit causality works! % %% % %% Revision 1.23 1998/04/04 10:46:37 peterg % %% Coerces port bonds to have smae direction as the imposing bonds @@ -342,13 +347,14 @@ end; % Set causality of a C or I which is not already set [ci_index,prefered] = getdynamic(status,system_type); if ci_index>0 - bond_index = components(ci_index,1) % its a one port - bonds(bond_index,1) = prefered; - bonds(bond_index,2) = prefered; + ci_bond_index = nozeros(components(ci_index,:)); # Get all bonds + ci_direction = sign(ci_bond_index); + ci_bond_index = abs(ci_bond_index); + bonds(ci_bond_index,1:2) = prefered*ci_direction'*[1 1]; end; end; % Print final causality