I have a plotting function inside imshow()
command.
The plot and the image should be in separate figures.
At the return from the inside function the current figure is of the plot thus imshow()
puts the image onto the same figure of the plot and kills the plot.
What can be done to make imshow()
open or get to an existing its own figure, while keeping such manner of nested function calling?
Apparently, I've found an answer:
imshow(nested_function());
nested_function()
save the handle to the
previous figure like fh_prev = gcf;
for examplenested_function()
nested_function()
activate the previous
figure with the command figure(fh_prev);