How to programmatically change the name of a S-function
5 views (last 30 days)
Show older comments
Hello,
I am developing a Matlab script which programmatically creates a Simulink model. In this Simulink model I'm using a library of a block which includes a S-function, and I'd like to be able to programmatically change the name of the S-function.
I've tried to use set_param, but unfortunately I haven't figured out how to change the name. I can do it manually, but as this library block will be used for hundreds of times in my Simulink model, manual editing becomes completely inefficient.
Any ideas?
1 Comment
Arun Badigannavar
on 22 Aug 2016
Even I am looking for keyword, Which gives me the name of the sfunctions
Answers (1)
Fangjun Jiang
on 22 Aug 2016
I tried and it seemed working.
set_param(BlockPath,'FunctionName','NewS_Function');
0 Comments
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!