fid = fopen('uncon_fat2_slowness.txt','r');
A = textscan(fid,'%f%f','Delimiter',',','headerLines',1);
data = cat(2,A{:});
但是
A
A =
[0x1 double] [0x1 double]
>> data = cat(2,A{:});
>> data
data =
Empty matrix: 0-by-2
我的文件在标题后面有2000行,如何正确阅读?
#"DensityScaled","Density"
-5.610522610822E-03 -5.610522610822E-03
-5.622053005619E-03 -5.622053005619E-03
-5.646903768966E-03 -5.646903768966E-03
-5.684320728827E-03 -5.684320728827E-03