I have made a simple GUI in GUIDE. I update field A by function myfun1 to the value 20, but I still get 1 in the Command Window! Why hasn’t handles variable been updated? What is the solution? I’d appreciate it if you explain it elaborately
function pushbutton1_Callback(hObject, eventdata, handles)handles.A = 1;guidata(hObject, handles);myfun1(hObject, eventdata, handles)disp(handles.A)function myfun1(hObject, eventdata, handles)handles.A = 20;guidata(hObject, handles);
Best Answer