Searching through a large text file in Matlab
Assuming we use Matlab, what is the best way to search for a string in a large text file (can be bigger than 1GB)? Reading the entire file into memory would be costly.
You need to look into this:Importing Large text data.
The method would be to use blocks. Load Data in blocks.
It can be done by the range input argument in xlsread. In the range itself, you can specify the columns as well..
num = xlsread(filename,sheet,xlRange)
filename = 'myExample.xlsx'; sheet = 1; xlRange = 'B2:C3'; subsetA = xlsread(filename, sheet, xlRange)