How to break FOR-loop if "progressbar" is closed
Matlab programming:*I have an m-file which makes a lot of Matrix calculation and in another m-file I have implemented a progressbar, to keep track of the calculations. I have a function so if the progressbar is closed the calculations stops:
function closeBar(src,evnt)
|selection = questdlg('Do you want to stop this process?',... 'Stop process',... 'Yes','No','Yes');
switch selection,
case 'Yes', delete(gcf)
case 'No' return
end|*
How do I break the FOR-loop in the other m-file, if case "Yes" is fulfilled?
Many thanks!