Can I comment out a block programmatically?

9 次查看(过去 30 天)
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
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