Contenuto principale

setRowHeadingAlign

Specify horizontal alignment for row heading

    Description

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

    Note

    The function setRowHeadingAlign 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 row headings, and set horizontal alignment for the row headings.

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

    table1 = ModelAdvisor.Table(2, 3);

    Add the titles and set horizontal alignment for row headings to the center for the Model Advisor table object table1.

    setRowHeading(table1,1,'Header 1');
    setRowHeadingAlign(table1, 1, 'center');
    
    setRowHeading(table1,2,'Header 2');
    setRowHeadingAlign(table1, 2, 'center');
    
    setRowHeading(table1,3,'Header 3');
    setRowHeadingAlign(table1, 3, '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.

    Number of rows to create in the Model Advisor results table, specified as an integer.

    Example: 5

    Data Types: int

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

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

    Version History

    Introduced in R2006b