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,14 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.16 1997/08/07 16:12:36 peterg +% %% Fixed sorting bug: now puts the jth component from the unsorted list +% %% into the kth component of the sorted list .. not vice versa! +% %% % %% Revision 1.15 1997/08/06 21:43:19 peterg % %% Corrected error in creating component list: the kth component of the % %% list is given by the jth component of the original list NOT vice % %% versa. % %% @@ -185,12 +189,13 @@ k=k+1; unsorted_port_list(k,:) = port_name(port_index,:); end; end; else % just use that provided by the component - unsorted_port_list = port_list; - k = n_comp_ports; +% unsorted_port_list = port_list; +% k = n_comp_ports; + k=0; end; %Either all ports or no ports should be labelled - write error %message if this is not so if (k~=0)&(k~=n_comp_ports) @@ -216,13 +221,15 @@ if (n_comp_ports==2)&(n_unsorted_ports==0) if direction(1)==direction(2) % Wrong way for default mtt_info(['Two-port ', comp_name, ' (', comp_type, ') does not have though-pointing arrows'], infofile); end; if direction(1)==1 %in - unsorted_port_list = port_list; + mtt_info([comp_name, ':in'], infofile); + unsorted_port_list = ['[in]';'[out]']; else %reverse the order - unsorted_port_list = port_list(2:1); + mtt_info([comp_name, ':out'], infofile); + unsorted_port_list = ['[out]';'[in]']; end; end; % Recompute the number of unsorted ports [n_unsorted_ports,m_unsorted_ports] = size(unsorted_port_list);