I use the textscan() to read complex text files as following code
clear, clc, closefid = fopen('Data.txt');C = textscan(fid,'%s %s %s %s %s %s %s %s %s %f %f %f %f %f %f %f %f %f %f %f %f %f %f %d %f %d %f %d %d %f %f %f %d %f %d %d %d %f %f %f %f %f %d %f %d %d %f %d %f %f %d %d %f %f %f %d %f %d %d %f %f %d %d %f %f %f %d %f %d %d %f %d %d %d %f %d %d %d %d %d','HeaderLines',3,'Delimiter',' ')fclose(fid);
I would like to know how to put repmat in the textscan() function instead of typing format repeat many times as above.
Please advise
Best Answer