Index: mttroot/mtt/lib/comp/simple/SS_eqn.m ================================================================== --- mttroot/mtt/lib/comp/simple/SS_eqn.m +++ mttroot/mtt/lib/comp/simple/SS_eqn.m @@ -17,10 +17,13 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ +% %% Revision 1.5 1996/12/04 21:27:53 peterg +% %% Replaced str2num by sprintf +% %% % %% Revision 1.4 1996/08/18 20:06:21 peter % %% Included zero outputs. % %% % %% Revision 1.3 1996/08/09 14:08:04 peter % %% Empty effort and flow attributes replaced by 'external'. @@ -59,11 +62,13 @@ inputs = structure(3); outputs = structure(4); zero_outputs = structure(5); if strcmp(effort_attribute, 'MTT_port') % Its a numbered port - port_number = sprintf('%1.0f',flow_attribute); + % Convert string to number + port_number = abs(flow_attribute)-abs('0'); + % Effort if bonds(1,1)==-1 % Source fprintf(filenum, '%s := %s_MTTu%1.0f;\n', ... varname(name, bond_number,1), name, port_number); else % Sensor