Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Why a variable randomly is not updated in MATLAB GUI using guidata function?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I have a problem in a GUI made using MATLAB Guide.
I have some timer functions which are executed sequentially. There is one variable (handles.UserData.C_cnt) which is shared between the timer functions. The variable is not updated after some random number of the execution of the timer function and I cannot figure out why this occurs. Could you check if the following structure I use for updating the variables inside a timer function is correct?
function timer_fcn(obj,event,hObject,eventdata)
handles = guidata(hObject);
handles.UserData.C_cnt = handles.UserData.C_cnt+1;
guidata(hObject, handles);
댓글 수: 3
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!