MATLAB Answers


How to read a csv with 30000 rows of data which are both numbers and texts?

Asked by Kelly Kyriakou on 27 Nov 2015
Latest activity Commented on by Kelly Kyriakou on 28 Nov 2015
How I can read a csv which contains about 30.000 rows of data that are both text and numbers? I have tried with xlsread and readtable commands but it stores the first 12650 rows.


Sign in to comment.

1 Answer

Answer by Walter Roberson
on 27 Nov 2015

You will probably need to use textscan()
Does the file have the same number of fields on each line?
Is it possible that the file changes formats after 12650 lines?


Show 1 older comment
I noticed that if I convert this file to xlsx and try to read in matlab it reads all the rows (30770) using both xlsread command and readtable command.
Ah. The problem is solved for your purposes then?
Yes I suppose, but I can't understand the reason...

Sign in to comment.