MATLAB Answers

How to configure S-Function Builder from command line?

31 views (last 30 days)
Jose Alejandro
Jose Alejandro on 15 Feb 2013
Answered: kiyoko on 24 Jul 2018
The graphical interface used to configure S-Function builder is nice. However, for larger projects it makes code maintainance hard.
It might be better to have scripts that can be ran to configure several S-Functions inputs, outputs, states, parameters sizes and types automatically all at once.
How would I configure, for example, number of inputs, name, type and size and dimension of an S-Function builder from the command line?
Thanks, Jose Ospina

  0 Comments

Sign in to comment.

Accepted Answer

TAB
TAB on 15 Feb 2013
Edited: TAB on 15 Feb 2013
See this solution on how to use s-function builder using command line.
Get S-function builder data with
appdata = sfunctionwizard(BlockHandle,'GetApplicationData');
Use appdata.SfunWizardData to read and write field data of S-function builder.
You can use sfunctionwizard to build the s-function builder from matlab command.

  4 Comments

Show 1 older comment
Jose Alejandro
Jose Alejandro on 19 Feb 2013
Thank you TAB for the answer, it seems what I am looking for. Is this available for Matlab 2007B? if not, is there anyway of doing this in that version?
TAB
TAB on 22 Feb 2013
I am not sure whether it is available in 2007B (I don't have 2007b to check this).
If it is not there in 2007b then you can use Legacy Code Tool. Legacy code tool is available in R2007b.
giga
giga on 1 May 2016
Hi, I tried to modify the appdata.SfunWizardData as described in these Matlb questions: 1 , 2 . However, the changes made to the appdata.SfunWizardData gets overwritten. I am using Matlab 2015a. Can anyone suggest how to make changes back to the SFunction Builder? Thanks!

Sign in to comment.

More Answers (1)

kiyoko
kiyoko on 24 Jul 2018
sfunctionwizard is undocumented and not officially supported. If you are looking for command-line s-function authoring functionality, then the legacy code tool is designed for this.

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by