how to clear axis in for loop?
조회 수: 2 (최근 30일)
Hi,I have an output Panel where the images are shown .At a time 25 images can be shown.But sometimes the axes are partially filled by images and I want to delete the empty axes.Suppose 3 images are present and rest of axis are empty the code is shown below for it. This is my code:-
> m=1;%for first axes
whats wrong here clearing only one axes? end
Thomas Koelen 2015년 5월 12일
Why would you use m instead of just using the i you already specified in your for loop?
For further work don't use i or j as variables because i and j are both functions denoting the imaginary unit:
So a variable called i or j will override them, potentially silently breaking code that does complex maths.
for your problem, you forgot a strcat, try again with
Walter Roberson 2015년 5월 13일
If your axis might contain some items with invisible handles and you want to get rid of the items, then you need to pass the 'reset' option to cla()