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.
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 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
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
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!