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

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 .

 채택된 답변

The Matlab Spot
The Matlab Spot 2013년 11월 13일
편집: The Matlab Spot 2013년 11월 13일
Try this... e.g. Model is open, block is named as 'Constant'...
replace_block(bdroot,'Name','Constant', 'built-in/FromWorkspace')

댓글 수: 1

Thank you very much . I was trying with replace_block(bdroot,'Name','Constant', 'built-in/From Workspace');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

제품

질문:

2013년 11월 13일

댓글:

2013년 11월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by