求教 如何快速查找对应序号并赋值。
Show older comments
描述:有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
Accepted Answer
More Answers (0)
Categories
Find more on Other Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!