Main Content

Array-Based Table

Convert rectangular array into table and insert it into report

Description

This component converts a rectangular cell array into a table and inserts the table into the report.

Table Content

  • Workspace variable name: Specifies the workspace variable name with which to construct the table.

  • Collapse large cells to a simple description: Consolidates large cells into one description.

Formatting Options

  • Table title: Specifies the title of your table.

  • Cell alignment:

    • left

    • center

    • right

    • double justified

  • Column widths: Inputs a vector with m elements, where m equals the number of columns in the table. Column sizing is relative and normalized to page width. For example, say that you have a 2-by-3 cell array and input the following into the Column widths field:

    [1 2 3]
    The report output format for the cell array is such that the second column is twice the width of the first column, and the third column is three times the width of the first column. If the vector is greater than the number of columns in the table, the vector is truncated so that the number of elements equals the number of columns. If m is less than the number of columns in the table, the vector is padded with 1s so that the number of elements equals the number of columns.

    If you use this field, it is recommended that you specify a width for each column. Any unspecified width defaults to 1. MATLAB® displays a warning when defaulting any unspecified column width to 1.

  • Table grid lines: Displays grid lines, which create borders between fields, in the table.

  • Table spans page width (HTML only): Sets the table width to the width of the page on which it appears.

Header/Footer Options

Designating a row as a header or footer row causes the contents of the row to appear in boldface.

  • Number of header rows: Specifies the number of header rows.

  • Footer options

    • No footer: Specifies no footers for the report.

    • Last N rows are footer: Enables you to select a footer that is different from your header.

Example

Consider the following cell array in the MATLAB workspace:

{'foo','bar';[3],[5]}

Its cell table in the report appears as follows.

foo

bar

3

5

Note that the table has no headers or footers and no title.

Insert Anything into Report?

Yes. Table.

Class

rptgen.cfr_table