필터 지우기
필터 지우기

Save GUI after pressing pushbutton

조회 수: 2 (최근 30일)
Hello kity
Hello kity 2013년 1월 14일
I made a GUI with three edit boxes, a value is entered in it, afterwards it should be saved after pressing a push button.
% --- Executes on button press in Table.
function Table_Callback(hObject, eventdata, handles)
% hObject handle to Tolerantietabel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Table=[ str2double(get(handles.T1Long,'String')), str2double(get(handles.T1Lat,'String')), str2double(get(handles.T1Vert,'String')];
Initially, the edit boxes have a value, which i choose (default value). but the user should be able to change that and press asave. after opening again it should show the new values.
How can is save the new entered values?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 14일
You can use a mat file named for example 'initfile', which will be used to default setting in your opening function. Then when the user changes some of these values, update your matfile
  댓글 수: 2
Hello kity
Hello kity 2013년 1월 15일
I tried this,
save Table
in the callback, this made a matrix in the directory.
in the opening function
load Table
so that i can
set(handles.edit1,'String', double2str(Table(1,1))) etc..
but this gives error...
Ilham Hardy
Ilham Hardy 2013년 1월 15일
What exactly is the error? post the error mesage as well..

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

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by