Main Content

setEntries

Set contents of table

Syntax

setEntries(content)

Description

setEntries(content) sets content of the table.

Input Arguments

content

A 2–D cell array containing the contents of the table. Each item of the cell array must be either a character vector or an instance of ModelAdvisor.Element. The size of the cell array must be equal to the size of the table specified in the ModelAdvisor.Table constructor.

Examples

Create a subtable

This example creates a table within a table using the ModelAdvisor.Table.setEntry function.

The default table formatting is:

  • Default color (black)

  • Left justified

  • Bold title, row, and column headings

Change table formatting using the ModelAdvisor.Table class.

This example creates a subtable within a table.

table1 = ModelAdvisor.Table(1,1);
table2 = ModelAdvisor.Table(2,3);
table2.setHeading('Table 2');
table2.setHeadingAlign('center');
table2.setColHeading(1, 'Header 1');
table2.setColHeading(2, 'Header 2');
table2.setColHeading(3, 'Header 3');
table1.setHeading('Table 1');
table1.setEntry(1,1,table2);