MATLAB: Efficient way to import data

data import table

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?

Best Answer

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.