Contenido principal

setColHeadingValign

Specify vertical alignment for column heading

    Description

    setColHeadingValign(tableObj, column, alignment) sets the vertical alignment of the specified column, column, in the Model Advisor table object, tableObj, to the alignment specified by alignment..

    Note

    The function setColHeadingValign 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 column headings, and set vertical alignment for column 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 vertical alignment for column headings to the middle in the Model Advisor table object table1.

    setColHeading(table1, 1, 'Header 1');
    setColHeadingValign(table1, 1, 'middle');
    
    setColHeading(table1, 2, 'Header 2');
    setColHeadingValign(table1, 2, 'middle');
    
    setColHeading(table1, 3, 'Header 3');
    setColHeadingValign(table1, 3, 'middle');

    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 columns to create in the Model Advisor results table, specified as an integer.

    Example: 2

    Data Types: int

    Column heading vertical alignment, specified as top, middle, or bottom.

    alignmentDefinition
    topVertically align column heading to the top.
    middleVertically align column heading to the middle.
    bottomVertically align column heading to the bottom.

    Version History

    Introduced in R2006b