Can I comment out a block programmatically?

조회 수: 9 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2019년 2월 25일
답변: MathWorks Support Team 2019년 3월 21일
I would like to stop logging data to workspace after importing some data from a model into my script. I would like to do that by commenting out the "ToWorkspace" block. Is there a way to do that in my script?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2019년 2월 25일
You can comment out a block by using the following command in a script.
>> set_param('modelName/ToWorkspace','commented','on')
To uncomment the same block.
>> set_param('modelName/ToWorkspace','commented','off')
You can use this command to comment out the ToWorksapce block after getting the data from the model.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by