How to rename connections between blocks in Simulink. Below is code to rename GotoTag in Blocks. But also to rename connection between blocks is required. In attachment is the corresponding Simulink model with a "From" and a "Goto" block that should be renamed with the code below. Additionally is a "Constant" block as dummy connected to the "Goto" block. This connection to "Goto" block should also get the new name of "Goto" block.
CurrentName = "A";RequiredName = "B";b1 = Simulink.findBlocks('model','GotoTag',CurrentName);for i=1:length(b1)set_param(b1(i),'GotoTag',RequiredName);end