Breaking from for loop in MATLAB GUI
- by Nick
I have a for loop in the opening function of a GUI in MATLAB and I'm trying to use a callback button to break the loop. I'm new to MATLAB. Here's the code I have:
%In the opening function of the GUI
handles.stop_now = 0;
for i=1:inf
if handles.stop_now==1
break;
end
end
% Executes on button press
function…