Hey Experts,
I got a problem with a GUI I am designing. I am writing some IF-ELSE IF statements inside the button as a check-condition for different increments. The relevant code can be found below.
function Simulate_Callback(hObject, eventdata, handles)DP = str2double(get(handles.dummy, 'String'));if (DP/handles.testdata.actualDP)*100 >=60 down =1;elseif (DPrice/handles.testdata.actualDP)*100 < 60 && ... (DPrice/handles.testdata.actualDP)*100 > 50 down = 0.5; else down = 0.05;endnewString = sprintf('%d', int32(DP -down));set(handles.dummy,'String',newString)
Initial value of DP is 100 and while is going down to 59 as it was supposed to (down=1), It looks like that handles.dummy does not update after that point and is stack on 59.
Any ideas guys? I can't get my mind around it.
Thanks a lot for your help! 🙂
Best Answer