How to get simulink library and block names for the add_block function?
Show older comments
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?
1 Comment
Richard Crozier
on 17 Sep 2012
Accepted Answer
More Answers (0)
Categories
Find more on Modeling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!