Extract overlapped rows from two excel files
1 回表示 (過去 30 日間)
古いコメントを表示
Hey all, I am a newbie for Matlab and sorry for the silly questions. Assume there are two excel files,excel1 and excel2. Excel1 contains students names and their scores for English and Math such as row1=(John,98.5,74.5),row2=(Cassie,68.53,74,8)row3=(Bob,95.23,82.65)..etc. Excel 2 which contains only a few students' names such as only John and Bob. Is there any way to extract rows of John and Bob and save their scores in a matrix ? So the final matrix should be A(1,1)=98.5 A(1,2)=74.5, A(2,1)=95.23 and A(2,2)=82.65. Thank you very much,
0 件のコメント
採用された回答
Oleg Komarov
2011 年 4 月 12 日
[data1, text1] = xlsread(xls1);
[data2, text2] = xlsread(xls2);
[text,pos] = intersect(text1,text2);
data1(pos,:)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!