Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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 日間)
Abdisa Amensisa
Abdisa Amensisa 2018 年 2 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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