Contenu principal

getTabByIndex

R2026b

Get Simulation Data Inspector tab by positional index

Since R2026b

    Description

    tab = getTabByIndex(tabGroup,idx) returns the Simulation Data Inspector tab at positional index idx.

    To access a Simulink.sdi.Tab object by specifying the tab name instead of index, use getTabByName.

    example

    Examples

    collapse all

    First, access the Simulink.sdi.TabGroup object. Then, access the Simulink.sdi.Tab object for the third tab using the index 3.

    tabGroup = Simulink.sdi.TabGroup;
    tab3 = getTabByIndex(tabGroup,3)
    tab3 = 
    
      Tab with properties:
    
            Name: 'Tab3'
           Color: 'none'
           Index: 3
        IsActive: 1

    Input Arguments

    collapse all

    Collection of tabs open in the Simulation Data Inspector, specified as a Simulink.sdi.TabGroup object.

    Tab index, specified as a positive integer between 1 and 8, inclusive. Tabs are indexed from 1 to 8, left to right. Reordering tabs in the Simulation Data Inspector updates the indices.

    Output Arguments

    collapse all

    Tab at index, returned as a Simulink.sdi.Tab object.

    Version History

    Introduced in R2026b