How to build multiple S-Functions from S-Function Builder at once

My simulink model contains many S-Functions build by S-Function Builders. But every time I change something, I have to click each S-Function Builder block to re-build. Is there a way I can re-build all the S-Functions of my model at once? (maybe from command window)
Thanks,

2 件のコメント

Jarrod Rivituso
Jarrod Rivituso 2012 年 3 月 29 日
Are they all exactly the same S-function?
Pengfei
Pengfei 2012 年 3 月 29 日
No, they are not the same.

サインインしてコメントする。

 採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 3 月 29 日

3 投票

You could write MATLAB code that loops over all the S-Function Builder blocks in your model and builds them using the commands listed on this solution: <http://www.mathworks.com/support/solutions/en/data/1-AWIVV1/index.html?product=ML&solution=1-AWIVV1>
You can find S-Function Builder blocks in your model using:
builderBlocks = find_system(bdroot, 'LookUnderMasks', 'all', ...
'BlockType','S-Function', 'MaskType', 'S-Function Builder');

4 件のコメント

Pengfei
Pengfei 2012 年 3 月 29 日
It works!!!! Thank you a lot, Kaustubha!!
Kaustubha Govind
Kaustubha Govind 2012 年 3 月 30 日
Pengfei: Glad that helped! Could you accept the answer please?
Pengfei
Pengfei 2012 年 3 月 30 日
Just did. Thanks again. Another question maybe you can answer: How do I change the content at the S-function builder's command window (i.e., "Outputs") from Matlab command window?
Kaustubha Govind
Kaustubha Govind 2012 年 4 月 2 日
Sorry, I'm not familiar with the S-Function Builder command-line API (I did a web search to find that solution I pointed to). You could try contacting MathWorks Tech Support if you have a license that's under maintenance.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by