Borrar filtros
Borrar filtros

Simulink: comment block by set_param in callback

2 visualizaciones (últimos 30 días)
Alexander
Alexander el 14 de Oct. de 2015
Editada: Alexander el 14 de Oct. de 2015
I am trying to use the PostLoad Callback to comment out Simulink blocks depending on parameters. So, in a file I have a parameter
UseBlock = 1;% or 0
The Postload function runs this file and knows the value of this parameter and if UseBlock is zero, the Postload function is supposed to comment out a certain block, if the value is 1 it is supposed to uncomment the block. I am using
set_param('Model/Block','Commented','on') % or 'off'
However, it does not work and interestingly any code occuring after this line (in the Postload Callback) is not executed. But I do not see any errors whatsoever.
Any ideas?

Respuestas (0)

Categorías

Más información sobre Model, Block, and Port Callbacks en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by