Using mulitiselect in uigetfile to plot the selected files

조회 수: 1(최근 30일)
noname 2018년 3월 26일
댓글: Von Duesenberg 2018년 3월 26일
Hi everyone,
My previous question was to open the selected file and plot it. The problem gets more complicate if I want to use multiselect in uigetfile to open as many files as possible, them plot those files. I don't know how to approach the problem. Can anyone help me? Thanks alot!


Von Duesenberg
Von Duesenberg 2018년 3월 26일
Is this useful ? :
[filename, pathname, ~] = uigetfile('*.txt', 'Select text files','MultiSelect', 'on');
if filename ~= 0
h = waitbar(0,'Loading files...');
for i=1:length(filename)
myTable = readtable([pathname filename{i}]);
plot(myTable.Var1, myTable.Var2, 'bo')
waitbar(i / length(filename))
  댓글 수: 2
Von Duesenberg
Von Duesenberg 2018년 3월 26일
If you're referring to column headers: if you open your files with readtable, your headers will be there:

댓글을 달려면 로그인하십시오.


Find more on Visual Exploration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by