Refresh Data under time interval

11 views (last 30 days)
Jeffrey Pang
Jeffrey Pang on 26 Apr 2019
I cannot get this code to run while under this time interval.
I want it so, when a button is pressed, the data will refresh and give me a different output than before
ex.
If time interval is less than half a second, then run code
else
if time interval is greater than half a second, run alternate code
function bool = CheckSlap(hObject, eventdata, handles)
bool = 0;
tic
while toc < 0.5
refreshdata(handles.slap);
if handles.slap == 1
bool = 1;
break;
end
end
end

Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!