Contenido principal

setHeadingAlign

Specify horizontal alignment for table heading

    Description

    setHeadingAlign(tableObj, alignment) sets the horizontal alignment of the table heading in the Model Advisor table object, tableObj, to the alignment specified by alignment.

    Note

    The function setHeadingAlign 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.

    Examples

    collapse all

    This example shows how to create a Model Advisor table object, add table heading, and set horizontal alignment for the table heading.

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

    table1 = ModelAdvisor.Table(2, 3);

    Add the table heading and set horizontal alignment for the heading to the center for the Model Advisor table object table1.

    setHeading(table1, 'Configuration Summary');
    setHeadingAlign(table1, 'center');
    

    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.

    Table heading horizontal alignment, specified as left, center, or right.

    alignmentDefinition
    leftHorizontally align table heading to the left.
    centerHorizontally align table heading to the center.
    rightHorizontally align table heading to the right.

    Version History

    Introduced in R2006b