How to pass/share data between GUIs?
이전 댓글 표시
I am trying to make a GUI that:
1stGUI: enter the number of tasks to run, then click "next" button to open another GUI to run the task.
% --- Executes on button press in Next_Button.
function Next_Button_Callback(hObject, eventdata, handles)
% hObject handle to Next_Button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if get(handles.Num_Task, 'Value') ~= 0
GUI_2
else
errordlg('Input cannot be zero.','Task Num. 0')
end
2ndGUI: run the task for the number of times entered in the 1stGUI.
So the question is, how do I access the "number of tasks" from the 1stGUI within the 2ndGUI, and also, 2ndGUI will run "number of tasks" times, and creates a matrix as the row number is "number of tasks" to store the data.
I read about "guidata", but did not get it to work.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!