メインコンテンツ

innerNamespaces

Inner namespaces defined in specified namespace

Since R2026a

    Description

    inner = innerNamespaces(namesp) returns a string array of inner namespaces defined in the specified namespace. innerNamespaces only returns namespaces that are visible in the current context.

    example

    Examples

    collapse all

    Get a string array of inner namespaces in the matlab.system namespace.

    innerNamespaces("matlab.unittest")
    ans = 
    
     9×1 string array
     
     "matlab.unittest.plugins"
     "matlab.unittest.constraints"
     "matlab.unittest.diagnostics"
     "matlab.unittest.fixtures"
     "matlab.unittest.parameters"
     "matlab.unittest.qualifications"
     "matlab.unittest.selectors"
     "matlab.unittest.measurement"
     "matlab.unittest.mutationtesting"

    Input Arguments

    collapse all

    Namespace, specified as a string or character vector.

    Output Arguments

    collapse all

    List of inner namespaces defined in the specified namespace, specified as a string array.

    Version History

    Introduced in R2026a