prompt the user to select a csv file

5 次查看(过去 30 天)
isamh
isamh 2020-3-9
评论: isamh 2020-3-9
I have two CSV files that I want the user to choose. I want to prompt the user to choose file or files needed. how would I do that?
I tried multiple ways and none worked correctly, the files have different length columns but same amount of rows and first two rows are headers and rest are numbers.
code is:
[FileName,PathName] = uigetfile('*.csv','Select the CSV file','MultiSelect','on');
column = numbers(1,:);
for col = 1:length(d)
end

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2020-3-9
uigetfile() only picks the file. Use csvread() afterwords
  3 个评论
isamh
isamh 2020-3-9
would csvread be after the for loop and contain columns? or would it be col?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by