MATLAB Answers

Reading a .csv file with datastore in MATLAB R2011b

5 views (last 30 days)
Hi, I was using xlsread to open a csv file with a bunch of values, but there were over 1,048,576 rows in the file and therefore were confined to the restrictions on excel (Excel only allows you to open files with less than 1,048,576 rows). Someone recommended I use datastore to read the file and circumvent excel. I looked up the datastore functions and found TabularTextDatastore which is great for .csv files. To my dismay, I soon realized that TabularTextDatastore is not on Matlab R2011b. When I ask for help in my workspace, this is what I get
" CGPARSEDATASTORE - A CAGE Simulink parse function ptr = datastore(obj,b,blockname,Inputs) Adds a variable if there is no matching DataStoreWrite Otherwise the parser will follow the DataStoreWrite "
I am a noob to matlab and programming so something as simple as this goes over my head. I need examples to really understand it. Does anyone know if there is something else I should use to read a very large csv file? Any more documentation on datastore for the R2011b version of matlab? Any ideas whatsoever will be helpful thank you.

  0 Comments

Sign in to comment.

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 25 Jul 2017
Hi Patrick,
that same person in this case recommends to use textscan, which is available in R2011b and is some sort of a predecessor to the more general concept of a datastore.
Titus

  1 Comment

Patrick Lydon
Patrick Lydon on 25 Jul 2017
you're the man Titus, thanks for help once again

Sign in to comment.

More Answers (0)

Sign in to answer this question.