How to programmatically change the name of a S-function

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

Even I am looking for keyword, Which gives me the name of the sfunctions

Sign in to comment.

Answers (1)

I tried and it seemed working.
set_param(BlockPath,'FunctionName','NewS_Function');

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Asked:

on 11 Jul 2014

Answered:

on 22 Aug 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!