This is my script. This script read through all columns and rows in the file. I want the script to only read the firs line/row in the text file.
while ischar(tline) ii = ii + 1; tmp = textscan(tline, '%s ', 'delimiter', ' ', 'MultipleDelimsAsOne', 1); tmp = tmp{1}; t(ii) = str2num(tmp{1}); x(ii) = str2num(tmp{2}); tline = fgetl(fid); end
Best Answer