Output from a delimiter

5 views (last 30 days)
Sérgio Querido
Sérgio Querido on 5 Oct 2017
Edited: per isakson on 5 Oct 2017
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 Comment
Sérgio Querido
Sérgio Querido on 5 Oct 2017
dataArray = textscan(fileID, formatSpec, endRow(1)-startRow(1)+1, 'Delimiter', delimiter, 'EmptyValue' ,NaN,'HeaderLines', startRow(1)-1, 'ReturnOnError', false);

Sign in to comment.

Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!