Effacer les filtres
Effacer les filtres

How Can I deactivate a simulink block from a M file

3 vues (au cours des 30 derniers jours)
Ilkay Meseli
Ilkay Meseli le 13 Juin 2013
Hi everyone,
I have general simulink model for modelling my system. This model is used for different analaysis. Now, For using this model in different analysis, I'm using 'comment out' options for deactivate some blocks.
I want to control my simulink file with m file.
Can I be done this process by using m file
thank you

Réponse acceptée

Andreas Goser
Andreas Goser le 13 Juin 2013
Modifié(e) : Andreas Goser le 13 Juin 2013
There is a block parameter 'Commented' you can use with SET_PARAM and GET_PARAM commands. Example
  • Open the vdp demo:
vdp
  • Select the gain block called 'Mu'
  • Try commands:
get_param(gcb,'Commented')
set_param(gcb,'Commented','on')
set_param(gcb,'Commented','off')

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by