Using replace_block with Simscape

1 次查看(过去 30 天)
I want to replace a simscape block with another one. This doens't work:
replace_block('vdp','Constant Area Pneumatic Orifice','fl_lib/Pneumatic/Pneumatic Elements/Variable Area Pneumatic Orifice','noprompt')
What am I doing wrong? Thanks in Advanced

采纳的回答

Sebastian Castro
Sebastian Castro 2015-7-16
Just tried the same command as you and it works fine on my end... although the block name stays the same. Is that maybe the case for you too?
- Sebastian
  1 个评论
Cedric Götze
Cedric Götze 2015-7-16
replace_block('vdp',sprintf('Constant Area\nPneumatic Orifice'),'fl_lib/Pneumatic/Pneumatic Elements/Variable Area Pneumatic Orifice','noprompt')
I found out, the \n was missing. This way it works!
Thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Nonlinear Operators 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by