Saving edit toolbox into mat file

조회 수: 18 (최근 30일)
Hazel Sialongo
Hazel Sialongo 2016년 9월 28일
답변: Geoff Hayes 2016년 9월 29일
After extracting the features of an image. The result will be appear in the edit toolbox.I want to happen now is, I want to save it as mat file but in one column only. Please help me!
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2016년 9월 28일
Hazel - do you mean to save all ten values from the edit textbox as a column to some mat file? When would this action occur?
Hazel Sialongo
Hazel Sialongo 2016년 9월 28일
Yes. The action will occur whenever I click the save data ( but you see, the image haven't push button for saving )

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

답변 (1개)

Geoff Hayes
Geoff Hayes 2016년 9월 29일
Hazel - since you just want to get the values that have been written to the text controls, just do something like the following in your save button callback
function save_Callback(hObject,event,handles)
dataToSave = [];
dataToSave = [dataToSave str2double(get(handles.text1,'String'))]; % mean
dataToSave = [dataToSave str2double(get(handles.text2,'String'))]; % sd
% etc.
save('myData.mat','dataToSave');
We use save to save the column of statistics to the mat file which we have named myData.mat.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by