matlab - Activate a specific figure when returning from a nested function -
i have plotting function inside imshow() command.
the plot , image should in separate figures.
at return inside function current figure of plot imshow() puts image onto same figure of plot , kills plot.
what can done make imshow() open or existing own figure, while keeping such manner of nested function calling?
well, apparently, i've found answer time done question, because find interesting enough , find nothing answering i'm writing answer well.
the algo this:
- open figure before
imshow(nested_function()); - upon starting
nested_function()save handle previous figurefh_prev = gcf;example - do plots along
nested_function() - before return
nested_function()activate previous figure commandfigure(fh_prev);
Comments
Post a Comment