I have a function that generates an array of axes but the number of axes that are generated is not constant, neither their position. So, i want every time that main function calls this function, to clean the panel before the new axes will be produced.
John Michell answered .
2025-11-20
You can use findall() to find the children axes
delete(findall(p, 'type', 'axes')); % p is handle of panel