Importing CSV files in MATLAB

조회 수: 1 (최근 30일)
T
T 2013년 6월 11일
Suppose I have the following lines in a .csv file:
Date,Time,Ch1:
09/07/2007,12:26:51.000,10.684
09/07/2007,12:26:51.005,14.957
If one used an older version of Excel, these would automatically be placed in three columns without the commas. However, the above is not the case.
I was wondering how to convert these strings into an array.

채택된 답변

T
T 2013년 6월 19일
int = size(raw,2);
if int == 3 raw ...
elseif int == 4
raw ...
end

추가 답변 (1개)

Iain
Iain 2013년 6월 11일
[n, t, r] = xlsread(filename);

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by