이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Hello there!...Any one can help me please how to import and then get file that already preprocessed in matlab format or .mat text file when clicked on push button.

조회 수: 1 (최근 30일)
I have a pre-processed text file in .mat format and I want to get the text file when I clicked on push button.
  댓글 수: 1
Abdisa Amensisa
Abdisa Amensisa 2018년 2월 3일
In GUI, I do have a push button. I want that when this push button is pressed a text file which is already pre-processed would be opened automatically without choosing a file.How can I do that....please I need your help.

답변 (1개)

Gayatri Menon
Gayatri Menon 2018년 2월 13일
Hi, You could enter the command to load the mat file in the pushbutton callback function.Please note that the workspace of functions which you are using in GUI is different than the Base workspace.So, if you want to load the mat file in base workspace, you will have to specify the workspace.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
evalin('base', 'load(''test.mat'')');
Hope the above code helps in understanding the point I was trying to explain Thanks

Community Treasure Hunt

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

Start Hunting!

Translated by