求教 如何快速查找对应序号并赋值。
古いコメントを表示
描述:有A,B两个文件,A>B,第一列是编号。现在要把B中每个编号下的整行数据对应导入A
Size比较大,我这样很慢,请问有没有什么办法
clc;clear
a=xlsread('文件A')
b=xlsread('文件B')
i=a(:,1)
for k=1:23133
[m,n]=find(i==b(k,1))
a(m,:)=b(k,:)
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Other Formats についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!