Code covered by the BSD License  

Highlights from
Image Restoration

image thumbnail
from Image Restoration by Prateek Garg
Restore images degraded due to degradation factors such as motion blur and noise.

my_closereq
function my_closereq
global comein;

if comein==2,
    %Function to close the window
    selection = questdlg(['Are you sure you want to close without saving?'],...
                         ['Close ' get(gcf,'Name')],...
                          'Yes','No','No');
    switch selection,
        case 'Yes',
            delete(gcf);
        case 'No'
            return
    end
else
    delete(gcf);
end

Contact us at files@mathworks.com