Error using vertcat. Dimensions of arrays being concatenated are not consistent.
1 view (last 30 days)
Show older comments
Ruben Ruiloba
on 5 Aug 2020
Commented: Ruben Ruiloba
on 8 Aug 2020
Hi I am trying to concatenate 2 tables both of them have the same number of columns but one of the columns, which is called PartyX, varies in length, so in Table1 PartyX is a 1X14 cell array
{'U'} {'XXX'} {'MP'} {'PAFT'} {'100659'} {'101659'} {'MFTP'} {'1000dbd659'} {'dsdad'} {'0'} {'XXX'} {'GB'} {'GB'} {'XXX'}
and in Table2
PartyX is a 1X2 cell array
{'ABC'} {'XXX'}
Could not concatenate the table variable 'PartyX' using VERTCAT.
Caused by:
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Any suggestions as to how I can resolve this
I am using this to concatenate
Table1 = [struct2table(orderfields(table2struct(Table1)),'asArray',1) ; struct2table(orderfields(table2struct(Table2)),'asArray',1)];
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Tables 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!