Hot to get Signal path and block port number from Simulink model
2 次查看(过去 30 天)
显示 更早的评论
How can I get a signal path and Block port number from a Simulink model porgrammatically using only a SIGNAL NAME?.
is it posible to search for a signal name within my Simulink model and get the path/route of the block where it is connected including the block port number?
this is a block within my model:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1464197/image.png)
I want to get : PATH = sldemo_suspn_3dof/Body Dynamics
and PORT NUMBER =1
using SINAL NAME : " Body_out1"
0 个评论
回答(1 个)
Fangjun Jiang
2023-8-25
open_system('f14');
lines=find_system('f14','FindALl','On','type','line','name','w');
get(lines(1),'SourcePort')
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!