Efficient way to import data

3 views (last 30 days)
jingz3
jingz3 on 19 Jun 2018
Edited: jingz3 on 20 Jun 2018
What is the convenient way to import from a csv file containing numbers and letters for data sorting (like Excel filter function)? Does it matter if I read it as table instead of string arrays?

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jun 2018
The most convenient way is typically readtable()
The most efficient way appears to be to use textscan(), according to the timings that people have posted. I have seen one report that in some cases readtable() can be much much slower -- though for my purposes it has always been a reasonable speed.
  1 Comment
jingz3
jingz3 on 20 Jun 2018
Edited: jingz3 on 20 Jun 2018
Thank you! readtable() works well for me.

Sign in to comment.

More Answers (0)

Categories

Find more on Tables 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!