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

조회 수: 2 (최근 30일)
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
Peter Babu
Peter Babu 2013년 11월 13일
Thank you very much . I was trying with replace_block(bdroot,'Name','Constant', 'built-in/From Workspace');

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by