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 Center および File ExchangeModeling についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by