Connectivity between pair of Simulink blocks

3 ビュー (過去 30 日間)
Hayatullahi Adeyemo
Hayatullahi Adeyemo 2021 年 3 月 9 日
回答済み: Pratyush Roy 2021 年 4 月 27 日
Hello all,
Please I need a guide on how to identify connectivity between every pair of Simulink blocks.
I was only able to get blocks that are connected to every block using get_param
b = ('myBlock','PortConnectivity');
function.
I want a situation whereby I can iterate between every pair of blocks and identify if there is connectivity (TRUE) between them or not (FALSE).
Thanks
Hayat

回答 (1 件)

Pratyush Roy
Pratyush Roy 2021 年 4 月 27 日
Hi,
There is no direct way to obtain whether any two blocks are conencted or not in Simulink. As a workaround, you can consider creating an adjacency matrix which shows the connection between different blocks. The link here refers to an answer which shows how to create an adjacency matrix for Simulink blocks.
Hope this helps!

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by