Main Content

setEntries

Specify content for all table cells

    Description

    setEntries(tableObj,tableContent) adds the content, tableContent, for all the cells in the Model Advisor table object, tableObj.

    Note

    The function setEntries is for formatting Model Advisor analysis results with Simulink® Check™. For more information, see Simulink Check.

    For information on how to set cell contents in MATLAB®, see Create Tables and Assign Data to Them.

    example

    Examples

    collapse all

    This example shows how to create a Model Advisor table object and insert the cell array into the cells of the table.

    Use ModelAdvisor.Table to create a Model Advisor table object with two rows and three columns.

    table1 = ModelAdvisor.Table(2,3);

    Create a two-dimensional cell array. For this example, create a 2-by-3 cell array where each cell contains a character vector.

    contents = {'a','b','c';'d','e','f'};

    Add Content to the Cells in a Model Advisor Table object.

    setEntries(table1,contents);

    For more information on how to format check results, see Define Custom Model Advisor Checks.

    Input Arguments

    collapse all

    Table of Model Advisor results, specified as a ModelAdvisor.Table object.

    Content in table of Model Advisor results, specified as a two-dimensional cell array containing the contents of the table. Each cell in 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.

    Example: {'Cell 1','Cell 3','Cell 5';'Cell 2','Cell 4','Cell 6'}

    Data Types: char

    Version History

    Introduced in R2006b