|  | 
| fid = fopen('新建文本文档.txt'); $ }  T" p1 k3 i0 D% `" }  w8 [$ tdata =textscan(fid,'%s %s %s');& M  i# J4 l, h: x% C4 J
 a = data(1,[1,2]);
 2 }0 x9 Q* H3 ]aa = cell2mat(cellfun(@(x) str2num(char(x)),a,'UniformOutput',false));
 ( b9 |& {) |0 ^1 ^b = data{:,3};6 ]' F% H5 A* m
 c = cellfun(@(x) str2num(char(x)),b,'UniformOutput',false);; ]8 J6 B5 m( U6 L
 index=cell2mat(cellfun(@(x) ~isempty(x),c,'UniformOutput',false));0 b- `; `: u" l+ Q& W: U# d
 result = [aa(index,: ), vertcat(c{index})];! {! [7 f" C) T6 n' K
 fclose(fid);
 | 
 |