Main Content

mpmsearch

Search for packages in repositories

Since R2024b

    Description

    mpmsearch(keyword) displays packages whose Name, DisplayName, FormerNames, Summary, or Description property contains the specified keyword. mpmsearch performs a case-insensitive search for the keyword in known repositories.

    example

    mpmsearch(Name=Value) displays packages based on the criteria specified by one or more name-value arguments.

    example

    mpmsearch(keyword,Name=Value) displays packages based on both the specified keyword and additional criteria.

    pkg = mpmsearch(___) returns an array of matlab.mpm.Package objects where each element is a package that meets the specified criteria. The order of packages in the returned array is based on their order in the MATLAB repository list. You can specify an output argument with any of the previous syntaxes.

    example

    Examples

    collapse all

    Display a list of all packages in known repositories with the specified keyword.

    mpmsearch("ai")
               Name            Version                    Summary                  
        ___________________    _______    ________________________________________ 
    
        "AdobeToolbox"         "4.2.2"    "Adobe Integrated Runtime (AIR) support" 
        "AIAssistant"          "2.0.1"    "Get AI help with your everyday tasks"   
        "AIAssistant"          "1.0.2"    "Get AI help with your everyday tasks"   
        "AirplaneMode"         "1.0.1"    "An app that shuts off your wifi"         
    

    Display a list of all packages in known repositories with the specified version range.

    mpmsearch(VersionRange=">=2.0.0")
               Name            Version                    Summary                  
        ___________________    _______    ________________________________________ 
    
        "AdobeToolbox"         "4.2.2"    "Adobe Integrated Runtime (AIR) support" 
        "AIAssistant"          "2.0.1"    "Get AI help with your everyday tasks"       
    

    Create a matlab.mpm.Package array for all packages in known repositories.

    pkg = mpmsearch(Name=wildcardPattern)
    pkg = 
    
      1×13 Package array with properties:
    
        Name
        DisplayName
        FormerNames
        Version
        ID
        Dependencies
        Provider
        Folders
        Summary
        Description
        ReleaseCompatibility
        Installed
        Editable
        InstalledAsDependency
        PackageRoot
        Repository
        InstalledDependencies
        MissingDependencies
    
      Display as table
    

    Input Arguments

    collapse all

    Search keyword, specified as a string scalar or character vector. The function performs a case-insensitive search for keyword as a substring in the Name, DisplayName, FormerNames, Summary, and Description properties of packages in known repositories.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: mpmsearch(CompatibleWithRelease="R2024b")

    Package name, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose Name or FormerNames property matches the specified pattern.

    Example: Name="MyPackage"

    Example: Name="Package"+lettersPattern

    Package display name, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose DisplayName property matches the specified pattern.

    Example: DisplayName="MyPackage"

    Example: DisplayName="Package"+lettersPattern

    Version range, specified as a string scalar, character vector, or matlab.mpm.Version object. This option limits the output to only packages whose Version property is within the specified version range.

    Version syntax follows the Semantic Versioning 2.0.0 format: <major version>.<minor version>.<patch version>, where each version number must be a nonnegative integer, for example 1.2.3. You can optionally specify a pre-release version by adding -<pre-release version> to the end of the version, for example 1.2.3-alpha. Optionally specify a build version by adding +<build version>.

    Specify a range of versions by including the <, <=, >, or >= operators in front of a version number. For example, >2.1.13 specifies all versions greater than 2.1.13. Specify more than one range separated by white space to further limit matches. For example, >2.1.13 <=2.1.15 includes versions 2.1.14 and 2.1.15, but not 2.1.13 or 2.1.16. Use the || operator to designate multiple acceptable version ranges. For example, <2.1.13 || >2.1.15 includes versions less than 2.1.13 and greater than 2.1.15, but not 2.1.14.

    Example: VersionRange="1.2.3"

    Example: VersionRange="1.2.3-alpha"

    Example: VersionRange="1.2.3-alpha+exp"

    Example: VersionRange=">2.1.13"

    Example: VersionRange=">2.1.13 <=2.1.15"

    Example: VersionRange="<2.1.13 || >2.1.15"

    Package identifier, specified as a string scalar or character vector containing a universally unique identifier (UUID). This option limits the output to only packages whose ID property matches the specified identifier.

    Example: ID="9ecfea6b-1710-4fb9-aa66-e4750f0e8251"

    Package specifier, specified as a string scalar, character vector, or a matlab.mpm.PackageSpecifier object. If PackageSpecifier is a string scalar or character vector, then it must contain a package specifier in the format "Name", "Name@VersionRange", or "Name@VersionRange@ID". This option limits the output to only packages whose package specifier fits the specified value.

    Example: PackageSpecifier="MyPackage"

    Example: PackageSpecifier="MyPackage@1.0.1"

    Example: PackageSpecifier="MyPackage@1.0.1@9ecfea6b-1710-4fb9-aa66-e4750f0e8251"

    Package provider, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose Provider property matches the specified pattern.

    Example: Provider="MathWorks"

    MATLAB release compatibility, specified as a string scalar, character vector, or a matlabRelease object. This option limits the output to only packages that are compatible with the specified release based on their ReleaseCompatibility property.

    If you specify a string scalar or character vector, use the full name of a MATLAB release version, for example "R2024b", or three dot-separated numbers in the format: <release year>.<first or second release>.<update number>, for example "24.2.0". When you specify a MATLAB version using semantic version syntax, the major version is equal to the last two digits of the release year. The minor version is 1 for a releases and 2 for b releases. The patch version is always 0. For example, R2024b has a semantic version of "24.2.0".

    If you do not specify CompatibleWithRelease, then the function uses the current MATLAB version.

    Example: CompatibleWithRelease="R2024b"

    Example: CompatibleWithRelease="24.2.0"

    Search repositories, specified as a matlab.mpm.Repository array or string array where each element is the name of a repository in the repository list. This option limits the output to only packages in the specified repositories based on their Repository property.

    Example: Repository="MyRepository"

    Filter versions, specified as "highestByRepository" or "all". Specify "highestByRepository" to return only the highest version of each unique package in each repository. Package uniqueness is determined by the ID property. Specify "all" to return all packages.

    Example: VersionSelectionPolicy="all"

    Version History

    Introduced in R2024b