If I have an "AC Voltage Source" and a "Parallel RLC Branch" in a model, when I run the following code, I get a connection lines betweenthese two blocks:
h_blk1 = get_param([gcs '/AC Voltage Source'], 'PortHandles'); h_blk2 = get_param([gcs '/Parallel RLC Branch'], 'PortHandles'); add_line(gcs, h_blk1.RConn(1), h_blk2.LConn(1), 'autorouting', 'on');add_line(gcs, h_blk1.LConn(1), h_blk2.RConn(1), 'autorouting', 'on');
When I rerun the following:
add_line(gcs, h_blk1.RConn(1), h_blk2.LConn(1), 'autorouting', 'on');
MATLAB crashes
Best Answer