Index: mttroot/mtt/bin/trans/m/abg2cbg.m ================================================================== --- mttroot/mtt/bin/trans/m/abg2cbg.m +++ mttroot/mtt/bin/trans/m/abg2cbg.m @@ -13,10 +13,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.5 1996/08/08 18:06:18 peter +% %% Unified file naming scheme +% %% % %% Revision 1.4 1996/08/08 08:30:06 peter % %% The cbg filename contains the system name - this makes things easier % %% when setting up the m to fig translation and m to ese translation % %% % %% Revision 1.3 1996/08/05 18:53:21 peter @@ -93,13 +96,11 @@ % Set initial status status = -ones(n_components,1); total = 2*n_bonds; done = sum(sum(abs(bonds)))/total*100; -% $$$ mtt_info(sprintf('Initial causality is %3.0f%s complete.', done, pc), infofile); -% Set the causality of the ports old_done = inf; while done~=old_done disp(sprintf('Causality is %3.0f%s complete.', done, pc)); old_done = done; @@ -117,11 +118,11 @@ end; if strcmp(comp_type,'1') comp_type = 'one'; end; - % Component cuasality procedure name + % Component causality procedure name cause_name = [comp_type, '_cause']; % Invoke the appropriate causality procedure if exist(cause_name)~=2 % Try a compound component disp('------------PUSH-----------------'); @@ -128,11 +129,14 @@ [comp_bonds,s] = abg2cbg(name, comp_type, full_name, comp_bonds, ... infofile); status(i)=max(abs(s)); disp('------------POP-----------------'); else % its a simple component + disp(['---', name, ' (', cause_name, ') ---']); + comp_bonds eval([ '[comp_bonds,status(i)] = ', cause_name, '(comp_bonds);' ]); + comp_bonds end; % Update the full bonds list % and convert from component orientated to arrow orientated causality bonds(bond_list,:) = comp_bonds.*direction;