How can I use edit box(GUI) data in multiple .m files?

조회 수: 1 (최근 30일)
Alexandros Golemis
Alexandros Golemis 2015년 1월 29일
댓글: Alexandros Golemis 2015년 2월 1일
I have a GUI with some edit boxes and some buttons. I want every time that the user pushes the button to store the data of the edit box into a variable or an object that i can use it in every .m file of my project. I use this code
text = get(handles.edit1,'string');
set(handles.edit7,'string', text);
to handle the input into the GUI.m file.

답변 (1개)

Geoff Hayes
Geoff Hayes 2015년 2월 1일
Alexandros - consider using the save function to save your data (as MATLAB variables) to a file that can be easily loaded by your other m files.
  댓글 수: 1
Alexandros Golemis
Alexandros Golemis 2015년 2월 1일
thank you, i used file to store the user input, but i didn't used save. I just used fopen, fprintf to write and textscan to read..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by