Is there a way to count the number of signal paths from each inport to each outport?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello all, I would like to know if there is a way to count the number of paths from inports to its corresponding outports? For example,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/158140/image.png)
From the above example, it is clear that Outport 1 can be reached from Inport1 and Inport2 & Outport2 can be reached from Inport2. This gives two Independent paths. Is there a way this can be calculated by means of matlab code? Please help.
Thanks in advance, Rashmi
0 Kommentare
Akzeptierte Antwort
ES
am 2 Aug. 2017
You have to start from each outport, and then find the preceeding block. You can use 'PortHandles', or 'PortConnectivity' iteratively till you reach the last source block (inport, constant, ground etc).
Example
get_param(outportblockpath, 'PortHandles')
get_param(outportblockpath, 'PortConnectivity')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Schedule Model Components finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!