Main Content

setColHeading

Specify column title for table in Model Advisor analysis results

    Description

    setColHeading(tableObj,column,heading) specifies the heading of the column in the Model Advisor table object tableObj.

    Note

    The function setColHeading 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 column headings.

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

    T1 = ModelAdvisor.Table(2,3);
    

    Specify column headings for the three columns in the Model Advisor table object.

    setColHeading(T1,1,'Header 1');
    setColHeading(T1,2,'Header 2');
    setColHeading(T1,3,'Header 3');

    Use setEntry in a check callback function in your sl_customization file to format your Model Advisor analysis 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.

    Column of the table, specified by an integer.

    Column heading title, specified by a character vector, Advisor.Element object, or Advisor.Element object array.

    Example: 'Heading 1'