Why is the port order on my Stateflow chart different than what appears in the Model Explorer?
26 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Jan 2021
Answered: MathWorks Support Team
on 18 Feb 2021
I have a Stateflow chart with two input ports, "Port_A" and "Port_B". In the Model Explorer, "Port_A" is assigned to input port 1, and "Port_B" is assigned to input port 2. However when looking at the overview of the chart, "Port_B" is above "Port_A". Why is this happening?
Accepted Answer
MathWorks Support Team
on 21 Nov 2025 at 0:00
Input and output ports can be rearranged by dragging and dropping the port arrows on the top model view of the chart. When this happens, the original port numbers are maintained, even if the order that they appear on the chart is different.
If the order that the ports appear on the chart is different than in the Model Explorer, then the ports may have been rearranged inadvertently. If this is the case, you should be able to drag and drop the ports to put them back in the correct order. Regardless of the order that the ports appear, the correct values should be assigned to the ports with the corresponding names.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!