Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
strange cell array to matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
[file,path]=uigetfile('*.csv','MultiSelect','on');
if ischar(file) % only 1 file selected
files={file};
end
File = fullfile(char(path),char(file));
I like normal x data and ydata in simple matrix form
[A1,delimiterOut,headerlinesOut] = importdata(File);
댓글 수: 0
답변 (1개)
Mohammad Sami
2020년 9월 18일
편집: Mohammad Sami
2020년 9월 18일
Use the function readtable (or readmatrix) to load your file.
opts = delimitedTextImportOptions('NumVariables',2,'Delimiter',';','DataLines',5);
A1 = readtable(File,opts);
댓글 수: 2
Mohammad Sami
2020년 9월 18일
You can then replace it with detect import options function. https://www.mathworks.com/help/matlab/ref/detectimportoptions.html
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!