I need a function that could tell me informations about ports of a simulink block like the name, positions, etc.
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I'm trying to find a function that could give me the following informations about the ports of a block in a model:
- name given to the port (input1, voltage, stream, etc.)
- number of the port on the block
- if it is a input or output port
thank you for your help
0 个评论
采纳的回答
goerk
2016-7-25
You can use the 'get_param' command.
get_param(gcb,'ObjectParameters') % return the available parameters
get_param(gcb,'Name') % for example returns the name of the current block
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!