Hauptinhalt

addTab

R2026b

Add new Simulation Data Inspector tab

Since R2026b

    Description

    newTab = addTab(tabsGroup) creates a new Simulation Data Inspector tab. Tab names are automatically generated using incremental naming from Tab1 to Tab8. You can create up to eight tabs.

    To rename a tab, use the Name property of the Simulink.sdi.Tab object.

    example

    Examples

    collapse all

    First, access the Simulink.sdi.TabGroup object. Then, add the new tab.

    tabGroup = Simulink.sdi.TabGroup;
    newTab = addTab(tabGroup);
    newTab = 
    
      Tab with properties:
    
            Name: 'Tab4'
           Color: 'none'
           Index: 4
        IsActive: 1

    The Simulink.sdi.TabGroup object automatically updates to reflect the new tab.

    Input Arguments

    collapse all

    Collection of tabs to add new tab to, specified as a Simulink.sdi.TabGroup object.

    Output Arguments

    collapse all

    New tab in the Simulation Data Inspector, returned as a Simulink.sdi.Tab object.

    Version History

    Introduced in R2026b