function confirmandexit
finish = questdlg('Do you really want to exit?','Binomial Fitting Program','Yes','No','Yes')
if finish=='Yes'
    close all
end