MATLAB: How to save an image using a push button on MATLAB gui

digital image processingimage analysisimage processingimage segmentationmatlab functionmatlab gui

Hi,
I have just started working with MATLAB GUI. I can open an image, process the image but unable to save the image to a destination folder.
Any help will be appreciated.

Best Answer

[filename, foldername] = uiputfile('Where do you want the file saved?');
complete_name = fullfile(foldername, filename);
imwrite(TheArray, complete_name);