Loading +TableBlock/set_code.m +8 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,10 @@ for i=1:size(outports,1) for j=1:size(out_handles,1) if strcmp(get_param(outports(i),'Name'),get_param(out_handles(j),'Name')) % Set the port number so the ports line up properly. set_param(outports(i), 'Port', get_param(out_handles(j), 'Port')); found = 1; end end Loading Loading @@ -174,6 +178,10 @@ for j = 1:size(out_handles,1) add_block('simulink/Sinks/Out1',new_port); new_port_num = sprintf('%s/1',get_param(out_handles(j),'Name')); dest_port = sprintf('%s/%d','code',j); % Set the port number so the ports line up properly. set_param(new_port, 'Port', get_param(out_handles(j), 'Port')); try add_line(getfullname(block_handle),dest_port,new_port_num); end Loading Loading
+TableBlock/set_code.m +8 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,10 @@ for i=1:size(outports,1) for j=1:size(out_handles,1) if strcmp(get_param(outports(i),'Name'),get_param(out_handles(j),'Name')) % Set the port number so the ports line up properly. set_param(outports(i), 'Port', get_param(out_handles(j), 'Port')); found = 1; end end Loading Loading @@ -174,6 +178,10 @@ for j = 1:size(out_handles,1) add_block('simulink/Sinks/Out1',new_port); new_port_num = sprintf('%s/1',get_param(out_handles(j),'Name')); dest_port = sprintf('%s/%d','code',j); % Set the port number so the ports line up properly. set_param(new_port, 'Port', get_param(out_handles(j), 'Port')); try add_line(getfullname(block_handle),dest_port,new_port_num); end Loading