How to clear images in app designer
18 views (last 30 days)
Show older comments
Othman Alkandri on 1 Feb 2023
Edited: Othman Alkandri on 2 Feb 2023
I am trying to clear the image when I click the reset button. I tried the following two commands.
Do you recommend other commands to use?
Image Analyst on 1 Feb 2023
clf clears a whole figure, not just one axes on the figure. It clears everything I believe. So, since that is never anything I want to do I never use it.
cla clears just the current axes or the one you told it to. I use this one a lot because I want to make sure the axes gets cleared. Often I put "hold on" to draw graphics in the overlay and forget to turn it off. If you don't call cla then display a new image, it will just add to the axes and be on top covering everything that was there before. If you do that enough, like dozens or hundreds of times, your memory will get exhausted and your program will get slower and slower.
More Answers (0)
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!