Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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 vue (au cours des 30 derniers jours)
Abdisa Amensisa
Abdisa Amensisa le 3 Fév 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaire
Abdisa Amensisa
Abdisa Amensisa le 3 Fév 2018
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.

Réponses (1)

Gayatri Menon
Gayatri Menon le 13 Fév 2018
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