I have two blocks with same name in my system but in two different subsystems. When I use replace_block both blocks are replaced. But I need to replace the exact block which I have mentioned in the argument list: Example: replace_block(get_param(LookUpnDTableList{index,1}, 'Parent'), 'Name', get_param(LookUpnDTableList{index,1}, 'Name'), NewBlock, 'noprompt') Should only replace the block get_param(LookUpnDTableList{index,1} in this subsystem. not every block. How to do this?

 채택된 답변

Farook Sadarudeen
Farook Sadarudeen 2017년 12월 21일

0 개 추천

I have found the solution. By adding 'SearchDepth' parameter I can restrict it to my subsystem.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by