How to clear a specific piece of output in a Live Script?
49 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Joan Vazquez
le 29 Juin 2020
Commenté : Alessio Ulivi
le 4 Juil 2023
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?
0 commentaires
Réponse acceptée
Plus de réponses (1)
Jared MacDonald
le 22 Mar 2021
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/558642/image.png)
This doesn't remove the corresponding code.
Jared
2 commentaires
Nathaniel H Werner
le 2 Août 2022
I highly encourage implementing a command to programmatically clear all or a specified output in a live script.
Alessio Ulivi
le 4 Juil 2023
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!
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!