MATLAB: Saving a prior instance of an image in a GUI

guideImage Processing Toolboxmatlab gui

I'm wanting to save certain instances of an image throughout image processing to display later in a figure to show the progression. How do I do this?
I have tried to create global variables in which to save instances of an image, but that hasn't worked.

Best Answer

Just keep those variables around in memory. Make sure they're in scope if you need them in different functions other than the one they were created in. Last resort is to write them to disk, which is wasteful if you don't need to store them permanently.
Related Question