I have some legacy code that reads in data from a text file. The author seems to avoid using readtable() in favour of using textscan() to get a cell array of strings and then converting the strings to the correct format afterwards. This seems like an awkward way of doing things, and takes a long time for big files so my questions are:
- Is there any obvious reason to do this? Is textscan somehow more flexible/robust than readtable?
- Is readtable optimised for reading data in a specified format? (i.e. faster than reading a string and converting)
Best Answer