Reputation: 33
I have a S-Function level 2 and i want to change his name.
I want to change that "mfile" from this image with something else, I want to make that with code in a function. I have a S Function and some inputs and some outputs generated programmatically and I don't know how to change that name with code. I try set_param but no success.
How to change S-Function name programmatically in a function ?
Upvotes: 2
Views: 274
Reputation: 4477
You use set_param to change the FunctionName parameter of that block.
set_param(blk, 'FunctionName', 'new_mfile');
where blk is the full path of the block, which can be obtained by gcb if the block is selected. 'new_mfile' is the name of your generated MATLAB file.
Upvotes: 2