Hi all,
I am only interested in the numerical values of line 10 and line 11 of multiple text files. Right now, i am using below code, but with %s, i get complete string and with %f, i donot get any values. Will really appreciate some helop
clear;
D = 'T:\New\files';S = dir(fullfile(D, '*.txt'));N = length(S);for k = 1:N fid = fopen(fullfile(D,S(k).name), 'r'); linenum = 10; h(k)= textscan(fid,'%s',1,'delimiter','\n', 'headerlines',linenum-1); fid=fclose(fid);end
Best Answer