How to get simulink library and block names for the add_block function?
이전 댓글 표시
Hello,
I would like to create a Simulink model programatically, using commands such as add_block etc. However, I'm having trouble finding out the correct names for the libraries and blocks in the libraries. As a specific example I have tried to add a Level-2 M-File S-Function with a command similar to the following:
add_block('simulink/User-defined Functions/M-S-Function', 'mymodel/thesfunction')
This however gives the error:
??? There is no block named 'simulink/User-defined Functions/M-S-Function'
It's also not clear whether I have to first load the User-defined Functions library first in this case. So I'm not sure if I have got the name of the library wrong, or something else.
In general how do I find the correct library name and block name for adding the block to a model programatically?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Modeling에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!