prompt the user to select a csv file

조회 수: 11 (최근 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
Fangjun Jiang
Fangjun Jiang 2020년 3월 9일
help csvread
isamh
isamh 2020년 3월 9일
would csvread be after the for loop and contain columns? or would it be col?

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

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by