MATLAB: How can i make a reset button in matlab gui

matlab gui code

as i have two axes in gui & i uploaded an image on one axes. after that i performed some operation on that image like gray scaling & operated image is showing on my 2 axes. Now i want a code for reset pushbutton to get the original image on secondary axes i.e. the image which is showing on my 1 axes.

Best Answer

Simply have the callback for your reset button call the same code that you originally did, namely imread() and imshow(), just call axes() first to switch to the second axes.
axes(handles.axes2)
originalImage = imread(fileName);
imshow(originalImage);