Concatenate vertically multiple tables with different dimensions
이전 댓글 표시
I'd like to concatenate vertically several tables with common and uncommon columns: in this example code columns is common to A and B but not the others. The example expected result is C. In this example Type doesnt exist for A, then in C it is replaced by Nan. In my example, there are only 2 tables with one common column. I need to do this for 8 tables with 3 common columns and 5-7 columns in total.
A =
3×2 table
code Name
____ _________
1001 {'Jones'}
1002 {'James'}
1001 {'Robert'}
B =
3×2 table
code Type
____ _________
201 {'Car'}
201 {'Bus'}
203 {'Train'}
C = code Name Type
____ _________ _________
1001 {'Jones'} Nan
1002 {'James'} Nan
1001 {'Robert'} Nan
201 Nan {'Car'}
201 Nan {'Bus'}
203 Nan {'Train'}
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!