Refresh Data under time interval

조회 수: 11 (최근 30일)
Jeffrey Pang
Jeffrey Pang 2019년 4월 26일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by