Matching the two columns of two different tables and to combine the common values in second table.
6 次查看(过去 30 天)
显示 更早的评论
I want to match two columns of different tables. One table has one column with a "station code" and other bale has 5 columns in which the first column has "station code". I want to print the final result with 5 column table with single and commmon station code.
Thank you.
0 个评论
采纳的回答
Kevin Holly
2022-8-18
编辑:Kevin Holly
2022-8-18
3 个评论
Kevin Holly
2022-8-18
t=table;
t.Column1 = rand(10,1);
t.station = {'Code1';'Code2';'Code3';'Code4';'Code5';'Code6';'Code7';'Code8';'Code9';'Code10'}
t2=table;
t2.station = {'Code1';'Code3';'Code4';'Code6';'Code7'};
t2.Column2 = rand(5,1);
t2.Column3 = rand(5,1);
t2.Column4 = rand(5,1);
t2.Column5 = rand(5,1)
t4 = innerjoin(t,t2)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 LaTeX 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!