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,18 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.20 1997/08/18 12:45:24 peterg +% %% Replaced: comp_bonds = bonds(bond_list,:) +% %% by: for kk = 1:n_comp +% %% comp_bonds(kk,:) = bonds(comp(kk),:); +% %% end; +% %% +% %% to avoid an octave bug in 1.92. +% %% % %% Revision 1.19 1997/08/18 11:23:59 peterg % %% Main component loop now misses out the ports (SS:[]) -- the causality % %% is merely passed through these components. % %% % %% Revision 1.18 1997/08/08 08:11:04 peterg @@ -215,12 +223,13 @@ % a bug in octave 1.92 (??) prevents this from working -- replace by % a loop -- but check on V2.0 % comp_bonds = bonds(bond_list,:) - for kk = 1:n_comp - comp_bonds(kk,:) = bonds(comp(kk),:); + comp_bonds=[]; + for kk = 1:n_bonds + comp_bonds(kk,:) = bonds(bond_list(kk),:); end; % Invoke the appropriate causality procedure if exist(cause_name)~=2 % Try a compound component @@ -242,17 +251,16 @@ status(i) = -1; end; end; else % its a simple component + disp(['---', name, ' (', cause_name, ') ---']); comp_bonds_in = comp_bonds % Convert from arrow orientated to component orientated causality comp_bonds = comp_bonds.*direction; - disp(['---', name, ' (', cause_name, ') ---']); - % Evaluate the built-in causality procedure eval([ '[comp_bonds,status(i)] = ', cause_name, '(comp_bonds);' ]); % and convert from component orientated to arrow orientated causality comp_bonds = comp_bonds.*direction;