MATLAB: Textscan (read data from second and fourth line)

textscan

i am having some trouble using textscan
i have data in input file as
AAA BBB CCC DDD
10 20 30 40
EEE FFF
40 50
how to read this data
i can read data if it is only in the first line of input file but having trouble it data is in multiple line

Best Answer

L2cell = textscan(fid, '%f%f%f%f', 1, 'HeaderLines', 1, 'CollectOutput', 1);
L4cell = textscan(fid, '%f%f', 1, 'HeaderLines', 1, 'CollectOutput', 1);