フィルターのクリア

I want to import .txt file using GUI through Pushbutton and reading it and displaying the values of the text file, please suggest me the solution

4 ビュー (過去 30 日間)
Hello, i want to devolve a GUI where it should import .txt file through push button and read the file and display the values of the text file. Please help me to understand this. I have got import file code,
if true
[fileList, folder] = uigetfile('*.txt',...
'Find the File to Import', ...
'Multiselect', 'on').....
What should be here ...?
end
  2 件のコメント
KSSV
KSSV 2018 年 4 月 9 日
How is your text file? If all numbers use load or importdata. If it also text have a look on textscan.
sandip bhagat
sandip bhagat 2018 年 4 月 9 日
Thanks for your quick reply, I have used that but not able to see imported values, results.
if true
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)
[fileList, folder] = uigetfile('*.txt',...
'Find the File to Import', ...
'Multiselect', 'on')
out = textscan(fileList,'%f %*s %*s\n%*s %*s %*s')
end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by