How to clear a specific piece of output in a Live Script?

83 次查看(过去 30 天)
I know how to "Clear all output", but I just want to delete a few lines of code and their output.
Is that possible or do I need to run the whole live script again?

采纳的回答

madhan ravi
madhan ravi 2020-6-29
Make a section break of that lines of code.

更多回答(1 个)

Jared MacDonald
Jared MacDonald 2021-3-22
Just to add, there is indeed a "Clear Output" right-click menu for outputs, in addition to "Clear All Output", which sounds like what you're looking for:
This doesn't remove the corresponding code.
Jared
  2 个评论
Nathaniel H Werner
I highly encourage implementing a command to programmatically clear all or a specified output in a live script.
Alessio Ulivi
Alessio Ulivi 2023-7-4
That's exactly what I would like to have. Because I have to open an image to interactively select a value, but then I don't want that image to remain as an output!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by