先处理一下数据,将ky -。。放在同一列,比如图片中倒数第9行,把ky -34调到1 0 后面,注意1 0和ky -34中间有空格隔开,然后用textread来读取数据的第五列
fn = 'my_data.txt';fid = fopen(fn,'r');R = [];while ~feof(fid) tl = fgetl(fid); id = findstr(tl,'SSID'); while ~feof(fid) tl = fgetl(fid); id = findstr(tl,'ky'); if ~isempty(id) dt = tl(id+3:id+10); dt = strtok(dt); R = [R; str2num(dt)]; end; end;end;disp(R);