MATLAB: How to Join Tables in report generator

join tablesMATLABMATLAB Report Generatormlreportgen.domreport generatortable

If the code goes like this:
import mlreportgen.dom.*
tablecontent1 = { ... };
table1 = Table(tablecontent1);
...
tablecontent2 = { ... };
table2 = Table(tablecontent2);
...
Assuming 2 tables have same colomn number and definitively can adjust some other properties.
How can join them into one single table?
Thanks!

Best Answer

  • Hi John,
    You can combine the cell array content and then create the DOM Table:
    import mlreportgen.dom.*
    tablecontent1 = { ... };
    ...
    tablecontent2 = { ... };
    ...
    % Combine the table content cell arrays and then create DOM Table
    tableContent = [tablecontent1; tablecontent2];
    table = Table(tableContent);
    ...
    Thanks,
    Rahul