Matching the two columns of two different tables and to combine the common values in second table.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Kevin Holly
am 18 Aug. 2022
Bearbeitet: Kevin Holly
am 18 Aug. 2022
3 Kommentare
Kevin Holly
am 18 Aug. 2022
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)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu LaTeX finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!