Hi MATLAB Experts,
I am trying to use textscan function to read txt file, which is actually having more than 100,000 rows and 100 columns.
In order to convert data into a matrix in MATLAB, I am using for loops as follows:
fid = fopen(filename,'r');tmp = textscan(fid,'%s','Delimiter','\n'); % there are many different data format existing (i.e. char/cell/double)
USdata = [];for n = 2:length(tmp{1}) temp_data = regexp(tmp{1}{n},'\t','split'); USdata = [USdata; temp_data]; end
However, it takes too long since it has more than 100,000 rows. What would be the most efficient way to do it??
Thanks for any help you could provide in advance.
Jake
Best Answer