Main Content

setHeading

Specify title for table in Model Advisor analysis results

    Description

    setHeading(tableObj,titleText) adds the title specified by titleText to the Model Advisor table object tableObj.

    Note

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

    For information on how to use tables in MATLAB®, see Create Tables and Assign Data to Them.

    example

    Examples

    collapse all

    Create a Model Advisor table object and add a title to the table.

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

    T1 = ModelAdvisor.Table(2,3);
    

    Add a title to the table.

    setHeading(T1,'Title of New Table');

    Use setHeading in a check callback function in your sl_customization file to format your Model Advisor analysis results.

    function result = SampleStyleOneCallback(system)
    T1 = ModelAdvisor.Table(2,3);
    setHeading(T1,'Title of New Table');
    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.

    Title text, specified as a character vector, ModelAdvisor.Element object, or ModelAdvisor.Element object array.

    Example: 'Table of fonts and styles used in model'