필터 지우기
필터 지우기

Finding Commented blocks programmatically

조회 수: 44 (최근 30일)
Shankar Santhosh
Shankar Santhosh 2020년 8월 5일
댓글: maiaL 2020년 8월 6일
Though find_system can include the commented blocks along with other blocks, is there any way in find_system or get_param to find only the blocks that were commented? (Both Commented-out or commented-through)
cmtd = find_system(model,'FollowLinks','on','LookUnderMasks','all','IncludeCommented','on')
I was trying to delete the commented blocks in a model.

채택된 답변

maiaL
maiaL 2020년 8월 5일
what about adding 'Commented','on' and 'Commented','through' to the find_system() arguments?
  댓글 수: 2
Shankar Santhosh
Shankar Santhosh 2020년 8월 6일
This thing worked if I use like below. Thanks.
cmtd = find_system(model,'FollowLinks','on','LookUnderMasks','all','IncludeCommented','on','Commented','on')
However I am wondering if there is any way to have a single find_system for both 'Commented', 'on' & 'through'.
maiaL
maiaL 2020년 8월 6일
I'm not aware that's possible. Perhaps you could run a find_system for each, and then use union(cmtd1,cmtd2) to get a single cell.

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

추가 답변 (0개)

카테고리

Help CenterFile 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