Main Content

setEntries

Specify contents of table in Model Advisor analysis results

    Description

    setEntries(tableObj,tableContent) specifies the content, tableContent, of a table, tableObj, in Model Advisor analysis results.

    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

    Create a Model Advisor table object, T1, and insert the cell array, contents, into the cells of the table.

    Use ModelAdvisor.Table to create a table object.

    T1 = 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'};

    Use setEntries in a check callback function in your sl_customization file to format your results.

    function result = SampleStyleOneCallback(system)
    T1 = ModelAdvisor.Table(2,3);
    contents = {'a','b','c';'d','e','f'};
    setEntries(T1,contents);
    result = T1;
    end

    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