Hauptinhalt

matlab.mpm.PlatformConfiguration

R2026b

Supported platforms for package

Since R2026b

    Description

    The PlatformConfiguration object represents the platforms and architectures that your package supports. To specify a platform configuration for your package, set the SupportedPlatforms property of the matlab.mpm.Package object to the PlatformConfiguration object.

    Creation

    Description

    platCon = matlab.mpm.PlatformConfiguration(platform,architectures) creates a PlatformConfiguration object with the specified platform and Architectures. If platform is an array, then the output is an array of PlatformConfiguration objects with each element corresponding to an element of the platform input.

    example

    Input Arguments

    expand all

    Supported platform, specified as "any", "windows", "linux", or "macos", or a string array or cell array of character vectors containing one or more of those values..

    This input argument sets the Platform property.

    Example: "windows"

    Example: ["linux","macos"]

    Data Types: char | string | table | cell

    Supported architectures, specified as "any", "arm64", or "x86_64", or a string array or cell array of character vectors containing one or more of those values.

    This input argument sets the Architectures property.

    Example: "arm64"

    Example: ["arm64","x86_64"]

    Data Types: char | string | table | cell

    Output Arguments

    expand all

    Platform configuration for a package, returned as a PlatformConfiguration object.

    Properties

    expand all

    Supported platform, specified as a Platform enumeration object with value any, windows, linux, or macos

    Supported architectures, specified as an Architectures enumeration array with one or more of the values any, arm64, or x86_64.

    Examples

    collapse all

    Create a PlatformConfiguration object that represents Windows as a platform with any architecture.

    platCon = matlab.mpm.PlatformConfiguration("windows","any")
    platCon = 
    
      PlatformConfiguration with properties:
    
             Platform: windows
        Architectures: any

    Use the PlatformConfiguration object to specify that a package pkg supports Windows only.

    pkg.SupportedPlatforms = platCon;

    Version History

    Introduced in R2026b