Effacer les filtres
Effacer les filtres

Using replace_block with Simscape

1 vue (au cours des 30 derniers jours)
Cedric Götze
Cedric Götze le 16 Juil 2015
Commenté : Cedric Götze le 16 Juil 2015
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

Réponse acceptée

Sebastian Castro
Sebastian Castro le 16 Juil 2015
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 commentaire
Cedric Götze
Cedric Götze le 16 Juil 2015
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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Electromagnetic Models dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by