Index: mttroot/mtt/bin/trans/m/rbg2abg.m ================================================================== --- mttroot/mtt/bin/trans/m/rbg2abg.m +++ mttroot/mtt/bin/trans/m/rbg2abg.m @@ -3,10 +3,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.29 1998/07/02 13:28:31 peterg +% %% Added defaults in new form BEFORE alias expansion +% %% % %% Revision 1.28 1998/07/02 12:36:05 peterg % %% Removed debugging lines % %% % %% Revision 1.27 1998/07/02 12:24:02 peterg % %% Expand port aliases @@ -220,12 +223,13 @@ in_bonds = 0; if ((comp_type!="0")&&(comp_type!="1")) eval( ["alias = ", comp_type, '_alias';]); # Get aliases if is_struct(alias) # are there any aliases for j=1:n_comp_bonds - port_name_index = getindex(port_bond,signed_bond_list(j)); - port_direction = -sign(signed_bond_list(j)); + signed_bond = signed_bond_list(j); + port_name_index = getindex(port_bond,signed_bond); + port_direction = -sign(signed_bond); if port_name_index==0 # There is no port on this bond - so try # to default unlabelled_ports++; if(unlabelled_ports==1) @@ -251,11 +255,13 @@ comp_name " (" comp_type ")"],fnum); end mtt_info(["Defaulting to port name " port_name_i " on component " \ comp_name " (" comp_type ")" ],fnum); port_name = [port_name; ["[" port_name_i "]"]]; # add to list - [port_name_index,junk] = size(port_name); # the corresponding index + [port_name_index,junk] = size(port_name); # the corresponding + # index + port_bond(port_name_index,:) = signed_bond; # add to port bond else port_name_i = deblank(port_name(port_name_index,:)); port_name_i = port_name_i(2:length(port_name_i)-1) # strip [] end; if struct_contains(alias,port_name_i) # Is this an alias?