Main Content

setEntry

Specify content cell in table in Model Advisor analysis results

    Description

    example

    setEntry(tableObj,row,column,cellEntry) adds the content specified by cellEntry to the cell in row, row, and column, column, in the Model Advisor table object tableObj.

    Note

    The function setEntry is for formatting tables in 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.

    Examples

    collapse all

    Create two Model Advisor table objects, T1 and T2, and insert T2 into the first cell of T1.

    Use ModelAdvisor.Table to create two Model Advisor table objects.

    T1 = ModelAdvisor.Table(1,1);
    T2 = ModelAdvisor.Table(2,3);

    Add T2 to the cell in the first row and first column of the Model Advisor table object T1.

    setEntry(T1,1,1,T2);

    Use setEntry in a check callback function in your sl_customization file to set table cell content in your Model Advisor results.

    function result = SampleStyleOneCallback(system)
    T1 = ModelAdvisor.Table(1,1);
    T2 = ModelAdvisor.Table(2,3);
    setEntry(T1,1,1,T2);
    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.

    Row of the table, specified by an integer.

    Column of the table, specified by an integer.

    Table cell content, specified by a character vector, ModelAdvisor.Element object, or ModelAdvisor.Element object array.