Output from a delimiter

4 次查看(过去 30 天)
Sérgio Querido
Sérgio Querido 2017-10-5
I have a csv with the following rows:
20170930,Ben,10777.785005,6221.201572,1924.805677,1626.732719,614.706354,390.338683,471,19,264,18,23,29.289600,5.318191
20170930,Carlos,10143.669919,6643.782529,1627.648047,1200.392359,447.719338,224.127646,420,20,305,27,17,30.335400,5.169949
20170930,Tommy,8950.225298,6162.109701,1394.045232,958.651623,280.330558,155.088184,288,16,223,25,8,28.056600,5.148149
I used the delimiter:
formatSpec = '%f%s%f%f%f%f%f%f%f%f%f%f%f%f%f';
Now, how can I get an output organized by rows and columns??
  1 个评论
Sérgio Querido
Sérgio Querido 2017-10-5
dataArray = textscan(fileID, formatSpec, endRow(1)-startRow(1)+1, 'Delimiter', delimiter, 'EmptyValue' ,NaN,'HeaderLines', startRow(1)-1, 'ReturnOnError', false);

请先登录,再进行评论。

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by