diff --git a/+TableBlock/set_code.m b/+TableBlock/set_code.m index 01bea75a6b639c29d89048be715ab48c64df690d..2ae9b90730b7817525034842ee3b69ae6ab4650c 100644 --- a/+TableBlock/set_code.m +++ b/+TableBlock/set_code.m @@ -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 @@ -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 diff --git a/@RGrid/delete_g1s.m b/@RGrid/delete_g1s.m index 2c5258b1578a6fd3ec9f24baf9026cd6430d9f49..f6501dacafddc3897ca8b1eb0cc64471025910a3 100644 --- a/@RGrid/delete_g1s.m +++ b/@RGrid/delete_g1s.m @@ -17,7 +17,7 @@ for i=1:size(object.Cells,2) end end if(~isempty(deleted)) - delete(object.Cells(deleted).result); + delete([object.Cells(deleted).result]); object.Cells(deleted) = []; end end diff --git a/@RGrid/delete_g2s.m b/@RGrid/delete_g2s.m index cf356c529b4ee6309b79109ad4c0dc8bef7157af..4e7c5278d9f284ae471aac99127584b2dfa6eb1d 100644 --- a/@RGrid/delete_g2s.m +++ b/@RGrid/delete_g2s.m @@ -20,7 +20,7 @@ for i=1:size(object.Cells,2) end end if(~isempty(deleted)) - delete(object.Cells(deleted).result); + delete([object.Cells(deleted).result]); object.Cells(deleted) = []; end end