I would like to read a (fairly big) log file into a MATLAB string cell in one step. I have used the usual:
s={}; fid = fopen(\'test.txt\'); tline = fgetl(fid); w
s = regexp(fileread('test.txt'), '(\r\n|\n|\r)', 'split');
The seashells example in Matlab's regexp documentation is directly on-point.