From GUI to workspace and from GUI1 to GUI2
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I made a simple GUI that imports data and plots it. I am working with regular formulas, such as:
a=var(b);
plot(a)
Now, I would like to save my vector "a" to a workspace automatically, so I can save my workspace later on (or if program can). Should I have used handles, i.e.
handles.a=var(handles.b);
I dont really get what handles are, so if someone can explain that on a basic level, I would appreciate it.
Also, how could I use that data from one GUI, in another GUI (they are connected as parts of the same program)?
댓글 수: 0
답변 (1개)
Image Analyst
2014년 3월 16일
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
You can't use handles since that is a structure that is local to each GUI. You'd have to write to a mat file or use setappdata() and getappdata(). Or assignin/evalin though those are normally not recommended.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!