Contenido principal

setEntryValign

Specify vertical alignment for cell content

    Description

    setEntryValign(tableObj, row, column, alignment) sets the vertical alignment of the cell specified in the row, row, and column, column, of the Model Advisor table object, tableObj, to the alignment specified by alignment.

    Note

    The function setEntryValign 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 content to a cell, and set the vertical alignment for the cell content.

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

    table1 = ModelAdvisor.Table(2, 3);

    Add the text 'First Entry' to the cell in the first row and first column of the Model Advisor table object table1.

    setEntry(table1,1,1,'First Entry');
    

    Set the vertical alignment of the cell content of the first row and first column of the Model Advisor table object to center.

    setEntryValign(table1,1,1,'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

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

    Example: 2

    Data Types: int

    Vertical alignment of cell content, specified as top, middle, or bottom.

    alignmentDefinition
    topVertically align content to the top of the cell.
    middleVertically align content to the middle of the cell.
    bottomVertically align content to the bottom of the cell.

    Version History

    Introduced in R2006b