Borrar filtros
Borrar filtros

How to replace a Constant block with a From Workspace block programatically?

5 visualizaciones (últimos 30 días)
How to replace a Constant block with a From Workspace block programatically? I have tried with replace_block but shows an error InvalidBlockHandle . If to replace the same constant block with inport its working fine .

Respuesta aceptada

The Matlab Spot
The Matlab Spot el 13 de Nov. de 2013
Editada: The Matlab Spot el 13 de Nov. de 2013
Try this... e.g. Model is open, block is named as 'Constant'...
replace_block(bdroot,'Name','Constant', 'built-in/FromWorkspace')
  1 comentario
Peter Babu
Peter Babu el 13 de Nov. de 2013
Thank you very much . I was trying with replace_block(bdroot,'Name','Constant', 'built-in/From Workspace');

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing 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