Package: mlreportgen.dom
Superclasses:
MATLAB table
Converts a MATLAB® table to a DOM table.
creates
a table object based on the specified MATLAB table. MLTableObj
= MATLABTable(table
)
creates
the table object and applies the specified table style. Define the
style in the template used to generate the report containing this
table.MLTableObj
= MATLABTable(table
,stylename
)
MATLABTable
ObjectThis example shows how to use a MATLABTable
object
to add a table to a report. This example adds a rule for the row name
column.
% Create a MATLAB table from workspace variables load patients; BloodPressure = [Systolic Diastolic]; patients = table(Gender,Age,Smoker,BloodPressure); patients.Properties.RowNames = LastName; % Create a report and create the MATLABTable object rpt = mlreportgen.dom.Document('MyFileName','pdf'); tbl = mlreportgen.dom.MATLABTable(patients); % Add a header for the row name column and add a rule tbl.Header.row(1).Children(1).append('Names'); tbl.RowNamesRule = true; % Add the table to the report append(rpt,tbl); close(rpt); % Display the report rptview(rpt.OutputPath);